ImportError: No module named _curses
See original GitHub issuepkgin install py27-pip-1.5.6
pip install --upgrade pip setuptools
Downloading/unpacking pip from https://pypi.python.org/packages/py2.py3/p/pip/pip-7.1.0-py2.py3-none-any.whl#md5=b108384a762825ec20345bb9b5b7209f
Downloading pip-7.1.0-py2.py3-none-any.whl (1.1MB): 1.1MB downloaded
Downloading/unpacking setuptools from https://pypi.python.org/packages/3.4/s/setuptools/setuptools-18.0.1-py2.py3-none-any.whl#md5=19c0c145c3d2a615b0a33f0aeddd1c02
Downloading setuptools-18.0.1-py2.py3-none-any.whl (461kB): 461kB downloaded
Installing collected packages: pip, setuptools
Found existing installation: pip 1.5.6
Uninstalling pip:
Successfully uninstalled pip
Found existing installation: setuptools 14.2
Uninstalling setuptools:
Successfully uninstalled setuptools
Successfully installed pip setuptools
Cleaning up...
pip install --upgrade httpie
Collecting httpie
Downloading httpie-0.9.2-py2.py3-none-any.whl (66kB)
100% |ββββββββββββββββββββββββββββββββ| 69kB 646kB/s
Collecting requests>=2.3.0 (from httpie)
Downloading requests-2.7.0-py2.py3-none-any.whl (470kB)
100% |ββββββββββββββββββββββββββββββββ| 471kB 831kB/s
Collecting Pygments>=1.5 (from httpie)
Downloading Pygments-2.0.2-py2-none-any.whl (672kB)
100% |ββββββββββββββββββββββββββββββββ| 675kB 661kB/s
Installing collected packages: requests, Pygments, httpie
Successfully installed Pygments-2.0.2 httpie-0.9.2 requests-2.7.0
http google.com
Traceback (most recent call last):
File "/usr/pkg/bin/http", line 7, in <module>
from httpie.__main__ import main
File "/usr/pkg/lib/python2.7/site-packages/httpie/__main__.py", line 6, in <module>
from .core import main
File "/usr/pkg/lib/python2.7/site-packages/httpie/core.py", line 23, in <module>
from httpie.downloads import Download
File "/usr/pkg/lib/python2.7/site-packages/httpie/downloads.py", line 15, in <module>
from httpie.output.streams import RawStream
File "/usr/pkg/lib/python2.7/site-packages/httpie/output/streams.py", line 5, in <module>
from httpie.context import Environment
File "/usr/pkg/lib/python2.7/site-packages/httpie/context.py", line 7, in <module>
class Environment(object):
File "/usr/pkg/lib/python2.7/site-packages/httpie/context.py", line 29, in Environment
import curses
File "/usr/pkg/lib/python2.7/curses/__init__.py", line 15, in <module>
from _curses import *
ImportError: No module named _curses
Issue Analytics
- State:
- Created 8 years ago
- Comments:5 (1 by maintainers)
Top Results From Across the Web
ImportError: No module named '_curses' when trying to import ...
Try this curses implementation for Windows. Β· I have the same exact problem on Windows 7 and am looking for a workaround.
Read more >No module named '_curses' Β· Issue #31 Β· wustho/epr - GitHub
I was trying to install it on SailfishOS using pip but I got an error during installation related to _curses module missing. I...
Read more >ImportError: No module named _curses ?
The curses module is not available on Windows, as you found out when you tried to import it. The documentation should probably make...
Read more >[Example code]-No module named '_curses'
Coding example for the question No module named '_curses' ... line 13, in <module> from _curses import * ModuleNotFoundError: No module named '_curses'....
Read more >Error Calling Import curses : r/learnpython - Reddit
ModuleNotFoundError : No module named '_curses'. >>> Any idea what I'm doing wrong?? ... r/learnpython - Python import error.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
EDIT_2: https://github.com/yyuu/pyenv/issues/240 mentions this and that thread seems to have the solution as well. An
apt-get install libncurses5 libncurses5-dev libncursesw5
followed by a reinstallation of pyenv solved the problem.@bixu - try installing the curses devel libs.
EDIT:This is only when used withpyenv
. Guess I would have to log an issue with pyenv.Seconded.A search points to this SO thread about UniCurses. But pip doesnβt seem to locate/get unicurses. Unicurses doesnβt look like a python module, if thatβs indeed the true source. (Though it is mentioned on pypi)Any other python module that once could use to get the curses functionality?pip search curses
shows pyCDK but pip fails to install pyCDK as well.In my case httpie was reporting
ImportError: No module named _curses
because I was trying to run it with a custompython2.7
install on a CentOS6 machine. I had topip uninstall httpie
thenpip2.6 install httpie
to get it working.