Why won't upgrading from pip version 6.1.1 to

2019-07-24 22:05发布

I'm running Red Hat Enterprise Linux (on AWS). Whenever I use pip, it warns me that my pip is out of date and that I need to upgrade it by doing pip install --upgrade pip.

But when I do that it seemingly has no effect and simply tells me the same thing. It's circular!

How can I fix this? See below

$ pip install --upgrade pip
You are using pip version 6.0.8, however version 8.1.1 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
Requirement already up-to-date: pip in my-virtualenv/lib/python2.7/site-packages

Since the aforementioned pip install --upgrade pip` doesn't seem to work, I just tried uninstalling and reinstalling python-pip. When I did that it tells me it will install pip 6.1.1.-1.21.amzn1. How can I make it install the newer version??

$ sudo yum install python-pip
Loaded plugins: priorities, update-motd, upgrade-helper
5 packages excluded due to repository priority protections
Resolving Dependencies
--> Running transaction check
---> Package python26-pip.noarch 0:6.1.1-1.21.amzn1 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

===========================================================================================================================================================
Package                               Arch                            Version                                    Repository                          Size
===========================================================================================================================================================
Installing:
 python26-pip                          noarch                          6.1.1-1.21.amzn1                           amzn-main                          1.9 M

Transaction Summary
===========================================================================================================================================================
Install  1 Package

Total download size: 1.9 M
Installed size: 6.4 M
Is this ok [y/d/N]:

1条回答
对你真心纯属浪费
2楼-- · 2019-07-24 22:27

Can you just download pip 8.1.1 from github then install it from commandline?

$ wget https://github.com/pypa/pip/archive/8.1.1.zip
$ unzip 8.1.1.zip
$ cd pip-8.1.1/
$ python setup.py install
查看更多
登录 后发表回答