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

problems with curses version / No module named '_curses' #99

Closed
dcsan opened this issue Jul 10, 2017 · 3 comments
Closed

problems with curses version / No module named '_curses' #99

dcsan opened this issue Jul 10, 2017 · 3 comments
Labels

Comments

@dcsan
Copy link

dcsan commented Jul 10, 2017

having problems with an install and not sure how to resolve...

(venv) root@gb3-docker:/opt/rikai/webnlp/app# python webrun.py 
Traceback (most recent call last):
  File "webrun.py", line 5, in <module>
    from webapp import routes
  File "/opt/rikai/webnlp/app/webapp/routes.py", line 11, in <module>
    import utils.log
  File "/opt/rikai/webnlp/app/utils/log.py", line 4, in <module>
    import blessed
ModuleNotFoundError: No module named 'blessed'
(venv) root@gb3-docker:/opt/rikai/webnlp/app# pip install blessed
Collecting blessed
  Downloading blessed-1.14.2-py2.py3-none-any.whl (64kB)
    100% |████████████████████████████████| 71kB 7.4MB/s 
Collecting wcwidth>=0.1.4 (from blessed)
  Downloading wcwidth-0.1.7-py2.py3-none-any.whl
Collecting six>=1.9.0 (from blessed)
  Downloading six-1.10.0-py2.py3-none-any.whl
Installing collected packages: wcwidth, six, blessed
Successfully installed blessed-1.14.2 six-1.10.0 wcwidth-0.1.7
(venv) root@gb3-docker:/opt/rikai/webnlp/app# python webrun.py 
Traceback (most recent call last):
  File "webrun.py", line 5, in <module>
    from webapp import routes
  File "/opt/rikai/webnlp/app/webapp/routes.py", line 11, in <module>
    import utils.log
  File "/opt/rikai/webnlp/app/utils/log.py", line 4, in <module>
    import blessed
  File "/opt/rikai/webnlp/venv/lib/python3.6/site-packages/blessed/__init__.py", line 10, in <module>
    from blessed.terminal import Terminal
  File "/opt/rikai/webnlp/venv/lib/python3.6/site-packages/blessed/terminal.py", line 8, in <module>
    import curses
  File "/usr/local/lib/python3.6/curses/__init__.py", line 13, in <module>
    from _curses import *
ModuleNotFoundError: No module named '_curses'

(venv) root@gb3-docker:/opt/rikai/webnlp/app# pip install curses
Collecting curses
  Could not find a version that satisfies the requirement curses (from versions: )
No matching distribution found for curses
(venv) root@gb3-docker:/opt/rikai/webnlp/app# pip install _curses
Invalid requirement: '_curses'
Traceback (most recent call last):
  File "/opt/rikai/webnlp/venv/lib/python3.6/site-packages/pip/_vendor/packaging/requirements.py", line 92, in __init__
    req = REQUIREMENT.parseString(requirement_string)
  File "/opt/rikai/webnlp/venv/lib/python3.6/site-packages/pip/_vendor/pyparsing.py", line 1617, in parseString
    raise exc
  File "/opt/rikai/webnlp/venv/lib/python3.6/site-packages/pip/_vendor/pyparsing.py", line 1607, in parseString
    loc, tokens = self._parse( instring, 0 )
  File "/opt/rikai/webnlp/venv/lib/python3.6/site-packages/pip/_vendor/pyparsing.py", line 1379, in _parseNoCache
    loc,tokens = self.parseImpl( instring, preloc, doActions )
  File "/opt/rikai/webnlp/venv/lib/python3.6/site-packages/pip/_vendor/pyparsing.py", line 3376, in parseImpl
    loc, exprtokens = e._parse( instring, loc, doActions )
  File "/opt/rikai/webnlp/venv/lib/python3.6/site-packages/pip/_vendor/pyparsing.py", line 1379, in _parseNoCache
    loc,tokens = self.parseImpl( instring, preloc, doActions )
  File "/opt/rikai/webnlp/venv/lib/python3.6/site-packages/pip/_vendor/pyparsing.py", line 3698, in parseImpl
    return self.expr._parse( instring, loc, doActions, callPreParse=False )
  File "/opt/rikai/webnlp/venv/lib/python3.6/site-packages/pip/_vendor/pyparsing.py", line 1379, in _parseNoCache
    loc,tokens = self.parseImpl( instring, preloc, doActions )
  File "/opt/rikai/webnlp/venv/lib/python3.6/site-packages/pip/_vendor/pyparsing.py", line 3359, in parseImpl
    loc, resultlist = self.exprs[0]._parse( instring, loc, doActions, callPreParse=False )
  File "/opt/rikai/webnlp/venv/lib/python3.6/site-packages/pip/_vendor/pyparsing.py", line 1383, in _parseNoCache
    loc,tokens = self.parseImpl( instring, preloc, doActions )
  File "/opt/rikai/webnlp/venv/lib/python3.6/site-packages/pip/_vendor/pyparsing.py", line 2670, in parseImpl
    raise ParseException(instring, loc, self.errmsg, self)
pip._vendor.pyparsing.ParseException: Expected W:(abcd...) (at char 0), (line:1, col:1)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/opt/rikai/webnlp/venv/lib/python3.6/site-packages/pip/req/req_install.py", line 82, in __init__
    req = Requirement(req)
  File "/opt/rikai/webnlp/venv/lib/python3.6/site-packages/pip/_vendor/packaging/requirements.py", line 96, in __init__
    requirement_string[e.loc:e.loc + 8]))
pip._vendor.packaging.requirements.InvalidRequirement: Invalid requirement, parse error at "'_curses'"

(venv) root@gb3-docker:/opt/rikai/webnlp/app# pip -vvv install blessed
Requirement already satisfied: blessed in /opt/rikai/webnlp/venv/lib/python3.6/site-packages
Requirement already satisfied: wcwidth>=0.1.4 in /opt/rikai/webnlp/venv/lib/python3.6/site-packages (from blessed)
Requirement already satisfied: six>=1.9.0 in /opt/rikai/webnlp/venv/lib/python3.6/site-packages (from blessed)
Cleaning up...
(venv) root@gb3-docker:/opt/rikai/webnlp/app# 

FWIW

(venv) root@gb3-docker:/opt/rikai/webnlp/app# python -V
Python 3.6.0
(venv) root@gb3-docker:/opt/rikai/webnlp/app# pip -V
pip 9.0.1 from /opt/rikai/webnlp/venv/lib/python3.6/site-packages (python 3.6)
(venv) root@gb3-docker:/opt/rikai/webnlp/app# 

@dcsan
Copy link
Author

dcsan commented Jul 10, 2017

(venv) root@gb3-docker:/opt/rikai/webnlp/app# lsb_release -a
No LSB modules are available.
Distributor ID:	Ubuntu
Description:	Ubuntu 16.04.2 LTS
Release:	16.04
Codename:	xenial
(venv) root@gb3-docker:/opt/rikai/webnlp/app# 

@beastsenior
Copy link

I have solved this problem using
apt-get install libncurses5 libncurses5-dev libncursesw5
and rebuilding the python3

@jquast
Copy link
Owner

jquast commented Nov 8, 2017

If you're building python yourselves, which appears to be the case, yes, you need libncurses, etc.

at the end of ./configure python reports modules that cannot be built because their dependent libraries are not found, pay closer attention to that next time!

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

No branches or pull requests

3 participants