描述:
在python2.7环境下,使用最新的pip(18.1)安装ipython,出现以下错误消息:
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-install-F9ixVH/ipython/
解决:
仔细查看报错原因,发现以下信息:
IPython 7.0+ supports Python 3.5 and above.
When using Python 2.7, please install IPython 5.x LTS Long Term Support version.
Python 3.3 and 3.4 were supported up to IPython 6.x.
python2.7最高只能支持ipython5.x版本。
在pypi上查看ipython的历史版本,然后输入:
pip install ipython=5.8.0
可以先输入以下命令
pip install ipython==6.x
然后可以查看可以安装的ipython版本有哪些
Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple
Collecting ipython6.x
Could not find a version that satisfies the requirement ipython6.x (from versions: 0.10, 0.10.1, 0.10.2, 0.11, 0.12, 0.12.1, 0.13, 0.13.1, 0.13.2, 1.0.0, 1.1.0, 1.2.0, 1.2.1, 2.0.0, 2.1.0, 2.2.0, 2.3.0, 2.3.1, 2.4.0, 2.4.1, 3.0.0, 3.1.0, 3.2.0, 3.2.1, 3.2.2, 3.2.3, 4.0.0, 4.0.1, 4.0.2, 4.0.3, 4.1.0, 4.1.1, 4.1.2, 4.2.0, 4.2.1, 5.0.0, 5.1.0, 5.2.0, 5.2.1, 5.2.2, 5.3.0, 5.4.0, 5.4.1, 5.5.0, 5.6.0, 5.7.0, 5.8.0, 6.0.0, 6.1.0, 6.2.0, 6.2.1, 6.3.0, 6.3.1, 6.4.0, 6.5.0, 7.0.0, 7.0.1, 7.1.0, 7.1.1, 7.2.0)
No matching distribution found for ipython==6.x