Ipython没有可用的readline和pip install readline错误 [英] Ipython no readline available and pip install readline error

查看:283
本文介绍了Ipython没有可用的readline和pip install readline错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我安装了ipython但它没有readline选项。我首先下载了gnu readline并编译并安装。 DId不知道这是否是一个合适的解决方案,但这是我想到的第一件事。它仍然无法使用与以前相同的错误:

I installed ipython but it doesn't have the readline option. I first downloaded gnu readline and compiled and installed. DIdn't know whether it was a proper solution but was the first thing I thought of. It still wouldn't work to no avail with the same error as before:


WARNING: Readline services not available on this platform.
WARNING: The auto-indent feature requires the readline library

然后我尝试使用pip install readline,我收到以下错误。任何帮助将不胜感激:

Then I tried using pip install readline and I get the error below. Any help would be appreciated:


running install

running build

running build_ext

building 'readline' extension

creating build

creating build/temp.linux-x86_64-2.6

creating build/temp.linux-x86_64-2.6/Modules

creating build/temp.linux-x86_64-2.6/Modules/2.x

gcc -pthread -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -DHAVE_RL_CALLBACK -DHAVE_RL_CATCH_SIGNAL -DHAVE_RL_COMPLETION_APPEND_CHARACTER -DHAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK -DHAVE_RL_COMPLETION_MATCHES -DHAVE_RL_COMPLETION_SUPPRESS_APPEND -DHAVE_RL_PRE_INPUT_HOOK -I. -I/home/jspender/include/python2.6 -c Modules/2.x/readline.c -o build/temp.linux-x86_64-2.6/Modules/2.x/readline.o -Wno-strict-prototypes

creating build/lib.linux-x86_64-2.6

gcc -pthread -shared build/temp.linux-x86_64-2.6/Modules/2.x/readline.o readline/libreadline.a readline/libhistory.a -L/home/jspender/lib -lncurses -lpython2.6 -o build/lib.linux-x86_64-2.6/readline.so

/usr/bin/ld: cannot find -lncurses

collect2: ld returned 1 exit status

error: command 'gcc' failed with exit status 1

----------------------------------------
Command /home/jspender/bin/python2.6 -c "import setuptools;__file__='/home/jspender/build/readline/setup.py';exec(compile(open(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --single-version-externally-managed --record /tmp/pip-lBWIOm-record/install-record.txt failed with error code 1
Storing complete log in /home/jspender/.pip/pip.log


推荐答案

tmaric 是对的。我在安装iPython(Ubuntu 12.10,quantal,32位)时遇到了同样的问题。我错过了ncurses5库的开发版本。尝试:

tmaric is right. I had the same problem while installing iPython (Ubuntu 12.10, quantal, 32-bit). I was missing the dev version of the ncurses5 library. Try:

sudo apt-get install libncurses5-dev

然后通过pip再次安装readline模块

and then installing the readline module again through pip

pip install readline

这篇关于Ipython没有可用的readline和pip install readline错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆