Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

can`t upgrade pip to the newest version 9.0.1 (OS:ubuntu 16.04LTS)

Tags:

python

pip

ubuntu

OS: ubuntu 16.04LTS

Python: 2.7.12 + Anaconda2-4.2.0 (64 bit)

I typed pip install --upgrade $TF_BINARY_URL to install tensorflow but terminal showed that my pip verson was 8.1.1, however version 9.0.1 is available.

Then I typed pip install --upgrade pip to upgrade but it showed Requirement already up-to-date: pip in ./anaconda2/lib/python2.7/site-packages,

I still can't use pip version 9.0.1 to install tensorflow. Does anyone know what's going on ??

like image 727
ZongHan-Li Avatar asked Sep 10 '25 01:09

ZongHan-Li


1 Answers

sudo -H pip install --upgrade pip

sudo is "super user do". This will allow you to execute commands as a super user. The H flag tells sudo to keep the home directory of the current user. This way when pip installs things, like pip itself, it uses the appropriate directory.

like image 149
Metagrapher Avatar answered Sep 12 '25 18:09

Metagrapher