Cannot upgrade pip 9.0.1 to 9.0.3 - requirement al

2019-03-11 02:14发布

问题:

I'm trying to update pip using pip install --upgrade pip, but I get a "requirement satisfied" error and an "outdated version" message at the same time

$ pip install --upgrade pip
Requirement already up-to-date: pip in 
/Users/user/Envs/proj/lib/python2.7/site-packages
You are using pip version 9.0.1, however version 9.0.3 is available.
You should consider upgrading via the 'pip install --upgrade pip' 
command.

How do I update?

回答1:

Recently, Python.org sites stopped supporting TLS version 1.0 and 1.1, which could be causing the chicken-and-egg problem you are facing. Try upgrading pip without using pip:

curl https://bootstrap.pypa.io/get-pip.py | python


回答2:

These two commands worked for me:

curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py

then:

python get-pip.py


回答3:

Try:
Right Click Anaconda Prompt (Run as Admin)

>> conda update pip

(It worked for me)



回答4:

The curl answer above didn't work for me. This worked for me

sudo python -m pip install --upgrade pip