python - 尝试通过终端安装 ipython 时出现问题

标签 python macos terminal ipython

我想通过 macOS 终端安装 ipython(我已经尝试了 easy_installpip),但总是出现特定问题,最后一行描述了:

Searching for ipython
Reading https://pypi.python.org/simple/ipython/
Best match: ipython 5.1.0
Downloading https://pypi.python.org/packages/d4/0b/70c913ed4c99eb84c589e5e25b28985ba93ca2a57e08959bb14372f7f5f8/ipython-5.1.0.zip#md5=9d6a0bd4d4c18a4dc88d2f69dfefdea7
Processing ipython-5.1.0.zip
Writing /tmp/easy_install-f_u6YT/ipython-5.1.0/setup.cfg
Running ipython-5.1.0/setup.py -q bdist_egg --dist-dir /tmp/easy_install-f_u6YT/ipython-5.1.0/egg-dist-tmp-3mwkoQ
checking package data
check version number
creating /Library/Python/2.7/site-packages/ipython-5.1.0-py2.7.egg
Extracting ipython-5.1.0-py2.7.egg to /Library/Python/2.7/site-packages
Adding ipython 5.1.0 to easy-install.pth file
Installing ipython script to /usr/local/bin
Installing iptest2 script to /usr/local/bin
Installing iptest script to /usr/local/bin
Installing ipython2 script to /usr/local/bin

Installed /Library/Python/2.7/site-packages/ipython-5.1.0-py2.7.egg
Processing dependencies for ipython
error: six 1.4.1 is installed but six>=1.9.0 is required by set(['prompt-toolkit'])

我该如何解决这个问题?

编辑:我尝试了sudo pip install --upgrade 6,但发生了权限错误。

OSError: [Errno 1] Operation not permitted: '/tmp/pip-GgNJ79-uninstall/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/six-1.4.1-py2.7.egg-info'

最佳答案

好吧,假设使用sudo easy_install ipython来安装ipython,这对我有用,为了获得最新版本的6.

sudo pip install --ignore-installed 6,更具有分析性的描述 here .

关于python - 尝试通过终端安装 ipython 时出现问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39315558/

相关文章:

macos - HUnit 不在 Mac 上导入

python - 根据无序日期在 pandas 中创建日期时间对象

python - 如何使用正则表达式将字符串元素转换为列表?

macos - Postgres 失败并显示 'could not open relation mapping file "global/pg_filenode.map"'

performance - 与mac相比,ubuntu中的Graphviz sfdp逊色?

linux - 如何设置 Vim 为终端的十六色?

macos - 去安装不使用 zsh

android - 如何更改终端的默认目录?

python - ALTER TABLE - 写入通信数据包时出错

python - 属性错误 : module 'torch' has no attribute 'hstack'