首页 > Python编程 > IPython报错:pkg_resources.DistributionNotFound: gnureadline

IPython报错:pkg_resources.DistributionNotFound: gnureadline

2015年5月9日

IPython报错:pkg_resources.DistributionNotFound: gnureadline
http://blog.csdn.net/bianer199/article/details/39892105
环境:系统OS X 10.9.5 Python 2.7.8

利用pip安装Ipython

pip install ipython

运行ipython报错:
[python] view plaincopy
<span style=”font-family:Microsoft YaHei;font-size:14px;”>Traceback (most recent call last):
File “/usr/local/bin/ipython”, line 5, in <module>
from pkg_resources import load_entry_point
File “/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources.py”, line 2603, in <module>
working_set.require(__requires__)
File “/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources.py”, line 666, in require
needed = self.resolve(parse_requirements(requirements))
File “/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources.py”, line 565, in resolve
raise DistributionNotFound(req) # XXX put more info here
pkg_resources.DistributionNotFound: gnureadline</span>

解决:
在terminal中type如下命令。
export CFLAGS=-Qunused-arguments
export CPPFLAGS=-Qunused-arguments
sudo -E pip install ipython[all] –force –upgrade
将会将所有重新安装。
执行完毕后再次type ipython,即可进入ipython shell。

分类: Python编程 标签:
本文的评论功能被关闭了.