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

No module named '_curses' #66

Open
CJSparrow opened this issue Nov 18, 2020 · 2 comments
Open

No module named '_curses' #66

CJSparrow opened this issue Nov 18, 2020 · 2 comments

Comments

@CJSparrow
Copy link

I got this error after I called ptop

PS C:\\> ptop
Traceback (most recent call last):
  File "C:\Python39\Scripts\ptop-script.py", line 33, in <module>
    sys.exit(load_entry_point('ptop==1.1', 'console_scripts', 'ptop')())
  File "C:\Python39\Scripts\ptop-script.py", line 25, in importlib_load_entry_point
    return next(matches).load()
  File "C:\Python39\lib\importlib\metadata.py", line 77, in load
    module = import_module(match.group('module'))
  File "C:\Python39\lib\importlib\__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1030, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
  File "<frozen importlib._bootstrap>", line 986, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 680, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 790, in exec_module
  File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
  File "C:\Python39\lib\site-packages\ptop-1.1-py3.9.egg\ptop\main.py", line 13, in <module>
    from ptop.interfaces import PtopGUI
  File "C:\Python39\lib\site-packages\ptop-1.1-py3.9.egg\ptop\interfaces\__init__.py", line 1, in <module>
    from .GUI import PtopGUI
  File "C:\Python39\lib\site-packages\ptop-1.1-py3.9.egg\ptop\interfaces\GUI.py", line 6, in <module>
    import npyscreen, math, drawille
  File "<frozen zipimport>", line 259, in load_module
  File "C:\Python39\lib\site-packages\npyscreen-4.10.5-py3.9.egg\npyscreen\__init__.py", line 5, in <module>
  File "<frozen zipimport>", line 259, in load_module
  File "C:\Python39\lib\site-packages\npyscreen-4.10.5-py3.9.egg\npyscreen\wgwidget.py", line 5, in <module>
  File "C:\Python39\lib\curses\__init__.py", line 13, in <module>
    from _curses import *
ModuleNotFoundError: No module named '_curses'

windows 10
python 3

so whats worng?

@CJSparrow
Copy link
Author

this is my installation debug:

Requirement already satisfied: certifi==2018.10.15 in c:\python39\lib\site-packages (from -r .\requirements.txt (line 1)) (2018.10.15)
Requirement already satisfied: chardet==3.0.4 in c:\python39\lib\site-packages (from -r .\requirements.txt (line 2)) (3.0.4)
Requirement already satisfied: drawille==0.1.0 in c:\python39\lib\site-packages (from -r .\requirements.txt (line 3)) (0.1.0)
Requirement already satisfied: idna==2.7 in c:\python39\lib\site-packages (from -r .\requirements.txt (line 4)) (2.7)
Requirement already satisfied: lehar==0.4 in c:\python39\lib\site-packages (from -r .\requirements.txt (line 5)) (0.4)
Requirement already satisfied: npyscreen==4.10.5 in c:\python39\lib\site-packages\npyscreen-4.10.5-py3.9.egg (from -r .\requirements.txt (line 6)) (4.10.5)
Collecting psutil==5.6.6
  Using cached psutil-5.6.6.tar.gz (447 kB)
Collecting requests==2.20.1
  Using cached requests-2.20.1-py2.py3-none-any.whl (57 kB)
Collecting urllib3==1.24.1
  Using cached urllib3-1.24.1-py2.py3-none-any.whl (118 kB)
Requirement already satisfied: argparse==1.4.0 in c:\python39\lib\site-packages\argparse-1.4.0-py3.9.egg (from -r .\requirements.txt (line 10)) (1.4.0)
Processing c:\users\buf\appdata\local\pip\cache\wheels\92\8f\22\1cd59cc83583aed759d5ee5e151db05a2e863a9aeaba5b14c9\huepy-0.9.8.1-py3-none-any.whl
Building wheels for collected packages: psutil
  Building wheel for psutil (setup.py) ... error
  ERROR: Command errored out with exit status 1:
   command: 'C:\Python39\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\buf\\AppData\\Local\\Temp\\pip-install-aivooq4d\\psutil\\setup.py'"'"'; __file__='"'"'C:\\Users\\buf\\AppData\\Local\\Temp\\pip-install-aivooq4d\\psutil\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d 'C:\Users\buf\AppData\Local\Temp\pip-wheel-o8e7mouw'
       cwd: C:\Users\buf\AppData\Local\Temp\pip-install-aivooq4d\psutil\
  Complete output (47 lines):
  running bdist_wheel
  running build
  running build_py
  creating build
  creating build\lib.win-amd64-3.9
  creating build\lib.win-amd64-3.9\psutil
  copying psutil\_common.py -> build\lib.win-amd64-3.9\psutil
  copying psutil\_compat.py -> build\lib.win-amd64-3.9\psutil
  copying psutil\_psaix.py -> build\lib.win-amd64-3.9\psutil
  copying psutil\_psbsd.py -> build\lib.win-amd64-3.9\psutil
  copying psutil\_pslinux.py -> build\lib.win-amd64-3.9\psutil
  copying psutil\_psosx.py -> build\lib.win-amd64-3.9\psutil
  copying psutil\_psposix.py -> build\lib.win-amd64-3.9\psutil
  copying psutil\_pssunos.py -> build\lib.win-amd64-3.9\psutil
  copying psutil\_pswindows.py -> build\lib.win-amd64-3.9\psutil
  copying psutil\__init__.py -> build\lib.win-amd64-3.9\psutil
  creating build\lib.win-amd64-3.9\psutil\tests
  copying psutil\tests\runner.py -> build\lib.win-amd64-3.9\psutil\tests
  copying psutil\tests\test_aix.py -> build\lib.win-amd64-3.9\psutil\tests
  copying psutil\tests\test_bsd.py -> build\lib.win-amd64-3.9\psutil\tests
  copying psutil\tests\test_connections.py -> build\lib.win-amd64-3.9\psutil\tests
  copying psutil\tests\test_contracts.py -> build\lib.win-amd64-3.9\psutil\tests
  copying psutil\tests\test_linux.py -> build\lib.win-amd64-3.9\psutil\tests
  copying psutil\tests\test_memory_leaks.py -> build\lib.win-amd64-3.9\psutil\tests
  copying psutil\tests\test_misc.py -> build\lib.win-amd64-3.9\psutil\tests
  copying psutil\tests\test_osx.py -> build\lib.win-amd64-3.9\psutil\tests
  copying psutil\tests\test_posix.py -> build\lib.win-amd64-3.9\psutil\tests
  copying psutil\tests\test_process.py -> build\lib.win-amd64-3.9\psutil\tests
  copying psutil\tests\test_sunos.py -> build\lib.win-amd64-3.9\psutil\tests
  copying psutil\tests\test_system.py -> build\lib.win-amd64-3.9\psutil\tests
  copying psutil\tests\test_unicode.py -> build\lib.win-amd64-3.9\psutil\tests
  copying psutil\tests\test_windows.py -> build\lib.win-amd64-3.9\psutil\tests
  copying psutil\tests\__init__.py -> build\lib.win-amd64-3.9\psutil\tests
  copying psutil\tests\__main__.py -> build\lib.win-amd64-3.9\psutil\tests
  running build_ext
  building 'psutil._psutil_windows' extension
  creating build\temp.win-amd64-3.9
  creating build\temp.win-amd64-3.9\Release
  creating build\temp.win-amd64-3.9\Release\psutil
  creating build\temp.win-amd64-3.9\Release\psutil\arch
  creating build\temp.win-amd64-3.9\Release\psutil\arch\windows
  C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\VC\Tools\MSVC\14.16.27023\bin\HostX86\x64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -DPSUTIL_VERSION=566 -DPSUTIL_WINDOWS=1 -D_WIN32_WINNT=0x01000 -D_AVAIL_WINVER_=0x01000 -D_CRT_SECURE_NO_WARNINGS -DPSAPI_VERSION=1 -IC:\Python39\include -IC:\Python39\include -IC:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\VC\Tools\MSVC\14.16.27023\include -IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\ucrt -IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\shared -IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\um -IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\winrt -IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\cppwinrt /Tcpsutil/_psutil_common.c /Fobuild\temp.win-amd64-3.9\Release\psutil/_psutil_common.obj
  _psutil_common.c
  C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\VC\Tools\MSVC\14.16.27023\bin\HostX86\x64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -DPSUTIL_VERSION=566 -DPSUTIL_WINDOWS=1 -D_WIN32_WINNT=0x01000 -D_AVAIL_WINVER_=0x01000 -D_CRT_SECURE_NO_WARNINGS -DPSAPI_VERSION=1 -IC:\Python39\include -IC:\Python39\include -IC:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\VC\Tools\MSVC\14.16.27023\include -IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\ucrt -IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\shared -IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\um -IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\winrt -IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\cppwinrt /Tcpsutil/_psutil_windows.c /Fobuild\temp.win-amd64-3.9\Release\psutil/_psutil_windows.obj
  _psutil_windows.c
  psutil/_psutil_windows.c(272): error C2094: label 'error' was undefined
  error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\BuildTools\\VC\\Tools\\MSVC\\14.16.27023\\bin\\HostX86\\x64\\cl.exe' failed with exit code 2
  ----------------------------------------
  ERROR: Failed building wheel for psutil
  Running setup.py clean for psutil
Failed to build psutil
Installing collected packages: psutil, urllib3, requests, huepy
  Attempting uninstall: psutil
    Found existing installation: psutil 5.7.2
    Uninstalling psutil-5.7.2:
      Successfully uninstalled psutil-5.7.2
    Running setup.py install for psutil ... error
    ERROR: Command errored out with exit status 1:
     command: 'C:\Python39\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\buf\\AppData\\Local\\Temp\\pip-install-aivooq4d\\psutil\\setup.py'"'"'; __file__='"'"'C:\\Users\\buf\\AppData\\Local\\Temp\\pip-install-aivooq4d\\psutil\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\buf\AppData\Local\Temp\pip-record-3k3wlmwh\install-record.txt' --single-version-externally-managed --compile --install-headers 'C:\Python39\Include\psutil'
         cwd: C:\Users\buf\AppData\Local\Temp\pip-install-aivooq4d\psutil\
    Complete output (47 lines):
    running install
    running build
    running build_py
    creating build
    creating build\lib.win-amd64-3.9
    creating build\lib.win-amd64-3.9\psutil
    copying psutil\_common.py -> build\lib.win-amd64-3.9\psutil
    copying psutil\_compat.py -> build\lib.win-amd64-3.9\psutil
    copying psutil\_psaix.py -> build\lib.win-amd64-3.9\psutil
    copying psutil\_psbsd.py -> build\lib.win-amd64-3.9\psutil
    copying psutil\_pslinux.py -> build\lib.win-amd64-3.9\psutil
    copying psutil\_psosx.py -> build\lib.win-amd64-3.9\psutil
    copying psutil\_psposix.py -> build\lib.win-amd64-3.9\psutil
    copying psutil\_pssunos.py -> build\lib.win-amd64-3.9\psutil
    copying psutil\_pswindows.py -> build\lib.win-amd64-3.9\psutil
    copying psutil\__init__.py -> build\lib.win-amd64-3.9\psutil
    creating build\lib.win-amd64-3.9\psutil\tests
    copying psutil\tests\runner.py -> build\lib.win-amd64-3.9\psutil\tests
    copying psutil\tests\test_aix.py -> build\lib.win-amd64-3.9\psutil\tests
    copying psutil\tests\test_bsd.py -> build\lib.win-amd64-3.9\psutil\tests
    copying psutil\tests\test_connections.py -> build\lib.win-amd64-3.9\psutil\tests
    copying psutil\tests\test_contracts.py -> build\lib.win-amd64-3.9\psutil\tests
    copying psutil\tests\test_linux.py -> build\lib.win-amd64-3.9\psutil\tests
    copying psutil\tests\test_memory_leaks.py -> build\lib.win-amd64-3.9\psutil\tests
    copying psutil\tests\test_misc.py -> build\lib.win-amd64-3.9\psutil\tests
    copying psutil\tests\test_osx.py -> build\lib.win-amd64-3.9\psutil\tests
    copying psutil\tests\test_posix.py -> build\lib.win-amd64-3.9\psutil\tests
    copying psutil\tests\test_process.py -> build\lib.win-amd64-3.9\psutil\tests
    copying psutil\tests\test_sunos.py -> build\lib.win-amd64-3.9\psutil\tests
    copying psutil\tests\test_system.py -> build\lib.win-amd64-3.9\psutil\tests
    copying psutil\tests\test_unicode.py -> build\lib.win-amd64-3.9\psutil\tests
    copying psutil\tests\test_windows.py -> build\lib.win-amd64-3.9\psutil\tests
    copying psutil\tests\__init__.py -> build\lib.win-amd64-3.9\psutil\tests
    copying psutil\tests\__main__.py -> build\lib.win-amd64-3.9\psutil\tests
    running build_ext
    building 'psutil._psutil_windows' extension
    creating build\temp.win-amd64-3.9
    creating build\temp.win-amd64-3.9\Release
    creating build\temp.win-amd64-3.9\Release\psutil
    creating build\temp.win-amd64-3.9\Release\psutil\arch
    creating build\temp.win-amd64-3.9\Release\psutil\arch\windows
    C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\VC\Tools\MSVC\14.16.27023\bin\HostX86\x64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -DPSUTIL_VERSION=566 -DPSUTIL_WINDOWS=1 -D_WIN32_WINNT=0x01000 -D_AVAIL_WINVER_=0x01000 -D_CRT_SECURE_NO_WARNINGS -DPSAPI_VERSION=1 -IC:\Python39\include -IC:\Python39\include -IC:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\VC\Tools\MSVC\14.16.27023\include -IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\ucrt -IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\shared -IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\um -IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\winrt -IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\cppwinrt /Tcpsutil/_psutil_common.c /Fobuild\temp.win-amd64-3.9\Release\psutil/_psutil_common.obj
    _psutil_common.c
    C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\VC\Tools\MSVC\14.16.27023\bin\HostX86\x64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -DPSUTIL_VERSION=566 -DPSUTIL_WINDOWS=1 -D_WIN32_WINNT=0x01000 -D_AVAIL_WINVER_=0x01000 -D_CRT_SECURE_NO_WARNINGS -DPSAPI_VERSION=1 -IC:\Python39\include -IC:\Python39\include -IC:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\VC\Tools\MSVC\14.16.27023\include -IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\ucrt -IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\shared -IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\um -IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\winrt -IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\cppwinrt /Tcpsutil/_psutil_windows.c /Fobuild\temp.win-amd64-3.9\Release\psutil/_psutil_windows.obj
    _psutil_windows.c
    psutil/_psutil_windows.c(272): error C2094: label 'error' was undefined
    error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\BuildTools\\VC\\Tools\\MSVC\\14.16.27023\\bin\\HostX86\\x64\\cl.exe' failed with exit code 2
    ----------------------------------------
  Rolling back uninstall of psutil
  Moving to c:\python39\lib\site-packages\psutil-5.7.2-py3.9.egg-info
   from C:\Python39\Lib\site-packages\~sutil-5.7.2-py3.9.egg-info
  Moving to c:\python39\lib\site-packages\psutil\
   from C:\Python39\Lib\site-packages\~sutil
ERROR: Command errored out with exit status 1: 'C:\Python39\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\buf\\AppData\\Local\\Temp\\pip-install-aivooq4d\\psutil\\setup.py'"'"'; __file__='"'"'C:\\Users\\buf\\AppData\\Local\\Temp\\pip-install-aivooq4d\\psutil\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\buf\AppData\Local\Temp\pip-record-3k3wlmwh\install-record.txt' --single-version-externally-managed --compile --install-headers 'C:\Python39\Include\psutil' Check the logs for full command output.

@MattAlmond-AUS
Copy link

pip install windows-curses

worked for me, just found this and had the same issue so thought I would share.

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

2 participants