首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >让ipython3在ubuntu linux中使用readline

让ipython3在ubuntu linux中使用readline
EN

Stack Overflow用户
提问于 2013-05-17 11:53:43
回答 1查看 1.1K关注 0票数 0

我在ubuntu上安装了python3.3.1 (虽然默认是python2.6.5),.I通常使用virtualenvwrapper工作。

我想安装支持python3.So的ipython,我这样做了

代码语言:javascript
复制
>>workon envpy331
(envpy331)damon@ubuntu:~$
(envpy331)damon@ubuntu:~$pip install ipython
....

安装完成后,我尝试

代码语言:javascript
复制
(envpy331)damon@ubuntu:ipython3
(envpy331)damon@ubuntu:

WARNING: IPython History requires SQLite, your history will not be saved
Python 3.3.1 (default, Apr 19 2013, 11:41:37) 
Type "copyright", "credits" or "license" for more information.

IPython 0.13.2 -- An enhanced Interactive Python.
?         -> Introduction and overview of IPython's features.
%quickref -> Quick reference.
help      -> Python's own help system.
object?   -> Details about 'object', use 'object??' for extra details.
WARNING: Readline services not available or not loaded.WARNING: The auto-indent feature requires the readline library

看到这一点,我尝试安装readline

代码语言:javascript
复制
(envpy331)damon@ubuntu:pip install readline

此程序已下载并尝试安装readline,但失败

代码语言:javascript
复制
/usr/bin/ld: cannot find -lncurses

collect2: ld returned 1 exit status

error: command 'gcc' failed with exit status 1

当我尝试查找libncurses时,我发现系统中安装了版本5

代码语言:javascript
复制
:locate libncurses

>>/lib/libncurses.so.5
/lib/libncurses.so.5.7
/lib/libncursesw.so.5
/lib/libncursesw.so.5.7
/usr/lib/vlc/plugins/gui/libncurses_plugin.so
/usr/share/doc/libncurses5
/usr/share/doc/libncursesw5
/usr/share/doc/libncurses5/FAQ
/usr/share/doc/libncurses5/README.Debian
/usr/share/doc/libncurses5/TODO.Debian
/usr/share/doc/libncurses5/changelog.Debian.gz
/usr/share/doc/libncurses5/copyright
/usr/share/doc/libncursesw5/changelog.Debian.gz
/usr/share/doc/libncursesw5/copyright
/var/lib/dpkg/info/libncurses5.list
/var/lib/dpkg/info/libncurses5.md5sums
/var/lib/dpkg/info/libncurses5.postinst
/var/lib/dpkg/info/libncurses5.postrm
/var/lib/dpkg/info/libncurses5.shlibs
/var/lib/dpkg/info/libncursesw5.list
/var/lib/dpkg/info/libncursesw5.md5sums
/var/lib/dpkg/info/libncursesw5.postinst
/var/lib/dpkg/info/libncursesw5.postrm
/var/lib/dpkg/info/libncursesw5.shlibs

你知道怎么纠正这个问题吗?

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2013-05-17 15:15:04

您已经安装了ncurses库,但还没有安装编译readline所需的开发头文件。

尝试安装libncurses5-dev,然后它应该可以工作。

票数 2
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/16601122

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档