Issue 17704: ImportError: No module named '_curses' (original) (raw)

Issue17704

Created on 2013-04-12 15:20 by marco.buttu, last changed 2022-04-11 14:57 by admin. This issue is now closed.

Messages (3)
msg186641 - (view) Author: Marco Buttu (marco.buttu) * Date: 2013-04-12 15:20
Right now I downloaded and installed Python 3.3.1 on Linux Mint 14, with Cinnamon: $ uname -a Linux buttu-oac 3.5.0-17-generic #28-Ubuntu SMP Tue Oct 9 19:31:23 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux $ python3.3 Python 3.3.1 (default, Apr 12 2013, 16:24:16) [GCC 4.7.2] on linux Type "help", "copyright", "credits" or "license" for more information. >>> import curses Traceback (most recent call last): File "", line 1, in File "/usr/local/lib/python3.3/curses/__init__.py", line 13, in from _curses import * ImportError: No module named '_curses' It works fine on Python 3.2, where I have: $ ls -1 /usr/lib/python3.2/lib-dynload/*_curses* /usr/lib/python3.2/lib-dynload/_curses.cpython-32mu.so /usr/lib/python3.2/lib-dynload/_curses_panel.cpython-32mu.so On Python 3.3: $ ls -1 /usr/lib/python3.3/lib-dynload/*_curses* /usr/lib/python3.3/lib-dynload/_curses.cpython-33dm-x86_64-linux-gnu.so /usr/lib/python3.3/lib-dynload/_curses.cpython-33m-x86_64-linux-gnu.so /usr/lib/python3.3/lib-dynload/_curses_panel.cpython-33dm-x86_64-linux-gnu.so /usr/lib/python3.3/lib-dynload/_curses_panel.cpython-33m-x86_64-linux-gnu.so Is this a Python bug?
msg186671 - (view) Author: Terry J. Reedy (terry.reedy) * (Python committer) Date: 2013-04-12 19:47
In general, 'Is this a bug' is better asked on python-list. In this particular case, I strongly suggest that. I have no idea which developer I might refer this to, and I am sure you will get a response from a 3.3 on linux user on the mailing list who will compare your ls results to his and perhaps suggest another test.
msg186685 - (view) Author: Ned Deily (ned.deily) * (Python committer) Date: 2013-04-13 00:01
Usually this kind of problem is caused by not having the necessary developer package of ncurses installed when building Python. The dev package includes the header files necessary for Python's curses module to build and link with libncurse{,w}. When you build Python 3.3.1, there probably was a message like: Python build finished, but the necessary bits to build these modules were not found: _curses I'm not familiar with Linux Mint but, if it is Debian or Ubuntu-based, try installing the libncurses5-dev package and rebuilding Python. The 3.3 _curses modules you show in /usr/lib are most likely left over from a previous Python 3.3.0 installation, possibly from a Linux Mint package. Note that the _curses files are installed in /usr/lib/python3.3 whereas the traceback from your Python 3.3.1 shows a /usr/local/lib/python3.3 path which is the default location if you built and installed it yourself. When built and installed, _curses should end up in /usr/local/lib/python3.3/lib-dynload.
History
Date User Action Args
2022-04-11 14:57:44 admin set github: 61904
2013-08-03 02:42:35 ned.deily set status: pending -> closed
2013-04-13 00:01:22 ned.deily set status: open -> pendingnosy: + ned.deilymessages: + resolution: not a bugstage: resolved
2013-04-12 19:47:29 terry.reedy set nosy: + terry.reedymessages: +
2013-04-12 15:20:09 marco.buttu create