python不能编译_ curses模块在debian Lenny上
题
我的python(2.6)在一些服务器上安装了一些我现在需要的诅咒支持,尽管服务器已安装了libncurses5,但python并未对其进行编译,因此当我“导入诅咒”时,我会得到:我得到:
"ImportError: No module named _curses"
我的 / lib / dir具有以下文件和符号链接:
lrwxrwxrwx 1 root root 17 2010-02-13 05:50 /lib/libncurses.so.5 -> libncurses.so.5.7
-rw-r--r-- 1 root root 251K 2008-12-14 22:31 /lib/libncurses.so.5.7
lrwxrwxrwx 1 root root 18 2010-02-13 05:50 /lib/libncursesw.so.5 -> libncursesw.so.5.7
-rw-r--r-- 1 root root 299K 2008-12-14 22:31 /lib/libncursesw.so.5.7
和 / lib64 /有:
lrwxrwxrwx 1 root root 20 2010-08-13 12:26 /lib64/libncurses.so -> /lib/libncurses.so.5
lrwxrwxrwx 1 root root 17 2010-02-13 05:50 /lib64/libncurses.so.5 -> libncurses.so.5.7
-rw-r--r-- 1 root root 251K 2008-12-14 22:31 /lib64/libncurses.so.5.7
lrwxrwxrwx 1 root root 18 2010-02-13 05:50 /lib64/libncursesw.so.5 -> libncursesw.so.5.7
-rw-r--r-- 1 root root 299K 2008-12-14 22:31 /lib64/libncursesw.so.5.7
/usr/lib64和/usr/lib都有:
lrwxrwxrwx 1 root root 20 2010-08-13 12:20 /usr/lib64/libncurses.so -> /lib/libncurses.so.5
当我尝试再次“制作” python时,我在最后回到以下警告:
Failed to find the necessary bits to build these modules:
_curses_panel _tkinter bsddb185
bz2 dl gdbm
imageop readline sunaudiodev
To find the necessary bits, look in setup.py in detect_modules() for the module's name.
Failed to build these modules:
_curses
我需要做些什么才能用诅咒支持python?我在这里想念什么?
谢谢!
解决方案 2
我不确定这些动作中的哪一个解决了我的问题,但其中之一可以解决。我安装了libncurses5-dev和libreadline5-dev,重新编译了python并重新安装(make / make install)。 huzza
其他提示
是的,这是正确的。安装 libncurses5-dev
并跑步 'make'
和 'make install'
在 python
安装可以解决问题。我遇到了错误 _curses
首先,试图安装和启动 bpython
在我的自定义Python安装中。
顺便说一句,在CentOS 6.4 64位上,您需要所有这些开发库来编译Python 2.7.6:
yum install -y zlib-devel openssl-devel sqlite-devel bzip2-devel \
ncurses-devel readline-devel gdbm-devel db4-devel tk-devel
后 yum install
那些,奔跑 make
还有四个模块:
Python Build完成了,但是找不到建造这些模块的必要位:
bsddb185 dl imageop sunaudiodev
要查找必要的位,请在setup.py中查找模块的名称中的detect_modules()中的py。
这些已经过时了 这篇博客文章:
sunaudiodev
是用于太阳平台,dl
对于32位平台,imageop
被弃用和bsddb185
没有证件。