Skip to content

ModuleNotFoundError when running bpython #780

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

Closed
KishinZW opened this issue Oct 20, 2019 · 7 comments
Closed

ModuleNotFoundError when running bpython #780

KishinZW opened this issue Oct 20, 2019 · 7 comments

Comments

@KishinZW
Copy link

Throws error:

Traceback (most recent call last):
File "d:\python36\lib\runpy.py", line 193, in run_module_as_main
"main", mod_spec)
File "d:\python36\lib\runpy.py", line 85, in run_code
exec(code, run_globals)
File "D:\Python36\Scripts\bpython.exe_main
.py", line 5, in
File "d:\python36\lib\site-packages\bpython\curtsies.py", line 11, in
import curtsies
File "d:\python36\lib\site-packages\curtsies_init
.py", line 4, in
from .window import FullscreenWindow, CursorAwareWindow
File "d:\python36\lib\site-packages\curtsies\window.py", line 11, in
import blessings
File "d:\python36\lib\site-packages\blessings_init_.py", line 5, in
import curses
File "d:\python36\lib\curses_init_.py", line 13, in
from _curses import *
ModuleNotFoundError: No module named '_curses'

@sebastinas
Copy link
Contributor

Did you install curses as recommended in the CLI Windows support section?

@KishinZW
Copy link
Author

Sorry that I'm too busy to see this. After I saw this error, I used curses unofficial binary to install it.
Then I found that bpython needs fcntl, so I made a fake fcntl module.
Well, it said that it need a module termios .

@sebastinas
Copy link
Contributor

sebastinas commented Oct 24, 2019

If you have installed curses, then bpython-cli should work. fcntl is only required for the curtsies frontend (by a dependency).

@elig0n
Copy link

elig0n commented May 23, 2020

@sebastinas How to get 'fcntl' ?
@SC-1123 can you explain how did you fake 'fnctl' ?

@sebastinas
Copy link
Contributor

I don't think you can get fcntl on Windows.

@johnd0e
Copy link

johnd0e commented Jun 14, 2021

See #509 (comment)

@abubelinha
Copy link

Did you install curses as recommended in the CLI Windows support section?

@sebastinas I did, and also saw #509 and #649
But still getting errors:

C:\Python38\scripts\pip install C:\soft\Python\wheels\curses-2.2.1+utf8-cp38-cp38-win_amd64.whl
Processing c:\soft\python\wheels\curses-2.2.1+utf8-cp38-cp38-win_amd64.whl
Installing collected packages: curses
Successfully installed curses-2.2.1+utf8

C:\Python38\scripts\pip install bpython
(...)
Successfully installed bpython-0.22.1

c:\Python38\scripts\bpython-curses
Traceback (most recent call last):
  File "c:\python38\lib\runpy.py", line 194, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "c:\python38\lib\runpy.py", line 87, in _run_code
    exec(code, run_globals)
  File "C:Python38\scripts\bpython-curses.exe\__main__.py", line 4, in <module>
  File "c:python38\lib\site-packages\bpython\cli.py", line 71, in <module>
    from .config import getpreferredencoding
  File "c:python38\lib\site-packages\bpython\config.py", line 38, in <module>
    from .curtsiesfrontend.parse import CNAMES
  File "c:\python38\lib\site-packages\bpython\curtsiesfrontend\parse.py", line 3, in <module>
    from curtsies.formatstring import fmtstr, FmtStr
  File "c:\python38\lib\site-packages\curtsies\__init__.py", line 4, in <module>
    from .window import FullscreenWindow, CursorAwareWindow
  File "c:\python38\lib\site-packages\curtsies\window.py", line 24, in <module>
    import blessings
  File "c:\python38\lib\site-packages\blessings\__init__.py", line 7, in <module>
    from fcntl import ioctl
ModuleNotFoundError: No module named 'fcntl'

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

5 participants