Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

import fcntl - error #69

Open
XCanG opened this issue Oct 12, 2017 · 6 comments
Open

import fcntl - error #69

XCanG opened this issue Oct 12, 2017 · 6 comments

Comments

@XCanG
Copy link

XCanG commented Oct 12, 2017

I've just installed pymux, but can't run it. Error:

C:\Windows\system32>pymux
Traceback (most recent call last):
  File "c:\python\python36\lib\runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "c:\python\python36\lib\runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "C:\Python\Python36\Scripts\pymux.exe\__main__.py", line 5, in <module>
  File "c:\python\python36\lib\site-packages\pymux\entry_points\run_pymux.py", line 28, in <module>
    from pymux.main import Pymux
  File "c:\python\python36\lib\site-packages\pymux\main.py", line 9, in <module>
    from prompt_toolkit.eventloop.posix import PosixEventLoop
  File "c:\python\python36\lib\site-packages\prompt_toolkit\eventloop\posix.py", line 2, in <module>
    import fcntl
ModuleNotFoundError: No module named 'fcntl'

P.S. installation output:

C:\Windows\system32>pip install pymux
Collecting pymux
  Downloading pymux-0.14-py3-none-any.whl (78kB)
    100% |████████████████████████████████| 81kB 495kB/s
Collecting prompt-toolkit<1.1.0,>=1.0.8 (from pymux)
  Downloading prompt_toolkit-1.0.15-py3-none-any.whl (247kB)
    100% |████████████████████████████████| 256kB 1.6MB/s
Collecting pyte<0.6.0,>=0.5.1 (from pymux)
  Downloading pyte-0.5.2-py2.py3-none-any.whl
Collecting docopt>=0.6.2 (from pymux)
  Downloading docopt-0.6.2.tar.gz
Requirement already satisfied: six>=1.9.0 in c:\python\python36\lib\site-packages (from pymux)
Collecting wcwidth (from prompt-toolkit<1.1.0,>=1.0.8->pymux)
  Downloading wcwidth-0.1.7-py2.py3-none-any.whl
Installing collected packages: wcwidth, prompt-toolkit, pyte, docopt, pymux
  Running setup.py install for docopt ... done
Successfully installed docopt-0.6.2 prompt-toolkit-1.0.15 pymux-0.14 pyte-0.5.2 wcwidth-0.1.7
@thorstenkampe
Copy link

Same error here. fcntl is Posix only, so pymux is not designed to run on Windows.

@dCosminn
Copy link

Same issue here. Damn i tough this would work on Windows. :(

@jonathanslenders
Copy link
Member

Hi @dCosminn,

The latest master branch should run on Windows 10, but only using pymux standalone for now.
I didn't release it yet, because it's not completely stable yet.

It depends on prompt_toolkit 2.0 and uses yawinpty. Given that yawinpty was removed from GitHub and that winpty is already a hack to begin with, I'm waiting for the next Windows release that supports true PTYs. This will make the Windows implementation super clean.
See: https://blogs.msdn.microsoft.com/commandline/2018/08/02/windows-command-line-introducing-the-windows-pseudo-console-conpty/

Also see: #58

@dCosminn
Copy link

That sounds awesome!
But in my case I was going to run it on a VPS which has Windows Server 2012.

@mmngreco
Copy link

mmngreco commented Sep 10, 2018

The same problem. I was going to run it on a win 7, so, someone knows if there is a workaround for this problem?

Update:
I try to run pymux after update prompt_toolkit from prompt-toolkit-1.0.15
to prompt-toolkit-2.0.4, but I got an error:

Traceback (most recent call last):
  File "c:\anaconda3\lib\runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "c:\anaconda3\lib\runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "C:\Anaconda3\Scripts\pymux.exe\__main__.py", line 5, in <module>
  File "c:\anaconda3\lib\site-packages\pymux\entry_points\run_pymux.py", line 28, in <module>
    from pymux.main import Pymux
  File "c:\anaconda3\lib\site-packages\pymux\main.py", line 5, in <module>
    from prompt_toolkit.buffer import Buffer, AcceptAction
ImportError: cannot import name 'AcceptAction'

@SLAYER-CODE
Copy link

Error IPYTHON
(tensor) C:\Windows\system32>ipython
Traceback (most recent call last):
File "c:\users\admin\anaconda3\envs\tensor\lib\runpy.py", line 194, in _run_module_as_main
return run_code(code, main_globals, None,
File "c:\users\admin\anaconda3\envs\tensor\lib\runpy.py", line 87, in run_code
exec(code, run_globals)
File "C:\Users\ADMIN\anaconda3\envs\tensor\Scripts\ipython.exe_main
.py", line 4, in
File "c:\users\admin\anaconda3\envs\tensor\lib\site-packages\IPython_init
.py", line 56, in
from .terminal.embed import embed
File "c:\users\admin\anaconda3\envs\tensor\lib\site-packages\IPython\terminal\embed.py", line 16, in
from IPython.terminal.interactiveshell import TerminalInteractiveShell
File "c:\users\admin\anaconda3\envs\tensor\lib\site-packages\IPython\terminal\interactiveshell.py", line 21, in
from prompt_toolkit.formatted_text import PygmentsTokens
ModuleNotFoundError: No module named 'prompt_toolkit.formatted_text'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants