通过pip install ipython
在Windows上安装ipython后,我无法运行它并收到以下错误。
> ipython
Traceback (most recent call last):
File "C:\Python27\scripts\ipython-script.py", line 5, in <module>
from pkg_resources import load_entry_point
File "C:\Python27\lib\site-packages\pkg_resources.py", line 2607, in <module>
parse_requirements(__requires__), Environment()
File "C:\Python27\lib\site-packages\pkg_resources.py", line 565, in resolve
raise DistributionNotFound(req) # XXX put more info here
pkg_resources.DistributionNotFound: pyreadline>=1.7.1
pyreadline是在ipython通过pip时安装的,但pip freeze
显示有关SVN位置的警告
> pip freeze
Warning: cannot find svn location for pyreadline==1.7.1.dev-r0
...
ipython==0.13.1
## FIXME: could not find svn URL in dependency_links for this package:
pyreadline==1.7.1.dev-r0
...
答案 0 :(得分:4)
解决方案是卸载安装ipython(pip uninstall pyreadline
)时拉出的pyreadline版本,并从http://www.lfd.uci.edu/~gohlke/pythonlibs/#pyreadline下载并安装pyreadline-1.7.1.win32-py2.7.exe