1. 程式人生 > >解決pip 8.1.1 無法升級到 pip 9.0.1

解決pip 8.1.1 無法升級到 pip 9.0.1

使用pip安裝模組時提示

You are using pip version 8.1.1, however version 9.0.1 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.

哦,要升級啊,那就升級唄,輸入:

pip install --upgrade pip

結果提示說:

Collecting pip
  Using cached pip-9.0.1-py2.py3-none-any.whl
Installing collected packages: pip
Successfully installed pip-8.1
.1 You are using pip version 8.1.1, however version 9.0.1 is available. You should consider upgrading via the 'pip install --upgrade pip' command.

怎麼升級了還是8.1.1??還是提示升級??
那就只好用wget了

sudo apt-get update
sudo apt-get upgrade
wget https://bootstrap.pypa.io/get-pip.py
sudo python get-pip.py

好了,檢視一下版本

pip --version

輸出

pip 9.0.1 from /home/ubuntu/.local/lib/python2.7/site-packages (python 2.7)

終於升級成功了