升级pip似乎仅安装当前版本(8.1),即使18可用

时间:2019-01-08 04:05:03

标签: python python-2.7 pip

我正在尝试在运行Python 2.7的Ubuntu计算机上升级pip。我只想对当前用户执行此操作,因此我正在使用以下命令:

python2 -m pip install --upgrade --user

按照最佳做法,我使用的是python2 pip install而不是pip install,即https://packaging.python.org/guides/installing-using-pip-and-virtualenv/

到目前为止,一切都很好。现在,Pip似乎可以获取pip-18.1 (pip-18.1-py2.py3-none-any.whl)并进行安装。但是,控制台报告它仅安装了pip-8.1.1(请参见下文)。

Downloading https://files.pythonhosted.org/packages/c2/d7/90f34cb0d83a6c5631cf71dfe64cc1054598c843a92b400e55675cc2ac37/pip-18.1-py2.py3-none-any.whl (1.3MB)
100% |████████████████████████████████| 1.3MB 31.1MB/s 
Installing collected packages: pip
Successfully installed pip-8.1.1

You are using pip version 8.1.1, however version 18.1 is available.

这里出了什么问题?为什么Pip只重新安装当前的pip版本?


(关于为什么我认为我需要pip-18的注释)

Collecting ipython>=4.0.0 (from ipykernel==4.10)
Downloading https://files.pythonhosted.org/packages/42/bb/0ed1fb1d57d697326f9e9b827d9a74b81dee56031ed7c252bc716195ad7a/ipython-7.2.0.tar.gz (5.1MB)
100% |████████████████████████████████| 5.1MB 149kB/s 
Complete output from command python setup.py egg_info:

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.

See IPython `README.rst` file for more information:

    https://github.com/ipython/ipython/blob/master/README.rst

Python sys.version_info(major=2, minor=7, micro=12, releaselevel='final', serial=0) detected.
Your pip version is out of date, please install pip >= 9.0.1. pip 8.1.1 detected.

0 个答案:

没有答案