While install a package:
....................
You are using pip version 8.1.1, however version 10.0.1 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.Ok:
$ pip install --upgrade pip
Collecting pip Downloading (1.3MB) 100% |████████████████████████████████| 1.3MB 961kB/s
Installing collected packages: pip
Successfully installed pip-8.1.1
You are using pip version 8.1.1, however version 10.0.1 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.Why? How to fix it?
17 Answers
To upgrade pip using pip is a bit different than regular command. Use
python -m pip install --upgrade pipHere python -m will read the pip library file as a script and you will be able to update.
Run the command to upgrade pip as root so pip can be upgraded if it is installed in the following location:
$ pip -V pip 10.0.1 from /usr/local/lib/python3.6/dist-packages/pip (python 3.6)
Command to upgrade pip:
sudo python -m pip install --upgrade pip Command to upgrade pip3 (for Python 3.x):
sudo python3 -m pip install --upgrade pipExplanation of the --upgrade option of pip install:
-U, --upgrade Upgrade all packages to the newest available version. This process is recursive regardless of whether a dependency is already satisfied.5
I don't know how it is done for pip-8 on Ubuntu-16, but I guess you could do it the same way I updated my pip-9 on Ubuntu-18 to current pip-20:
On Linux or macOS:
pip install -U pipglobally or for specific versions/installations:
python -m pip install -U pip
python3 -m pip install -U pip
python3.8 -m pip install -U pip
etc.On Windows:
python -m pip install -U pipCause line "python -m pip install --upgrade pip" from Installing packages using pip and virtual environments didn't work for me.
If you were like me you had created a virtual environment in a project folder.python -m venv env
So in order to make the pip upgrade work, go into the Scripts folder of the env folder.
Then run .\python -m pip install --upgrade pip.
Ditto with any pip installs. Same folder .\pip install ....
The .\ pins it to the command in the current folder, be it pip or python.
(I was doing this on Windows. But ./ would be the equivalent for Unix variants)
PS: I also ran those commands as Administrator - so sudo the commands if things fails.
__main__.py was moved to _internal in the later versions of python. This file should not exist in dist-packages or .local.
Try one of these based on what python version you are using. Then try pip2 -V. Worst case, you can put them back.
sudo mv /usr/local/lib/python3.5/dist-packages __main__.py /tmp
pip3 -V
sudo mv /usr/local/lib/python2.7/dist-packages __main__.py /tmp
pip2 -V
sudo mv ~.local/lib/python2.7/site-packages __main__.py /tmp I wouldn't worry about it unless you have a problem. I was following the Google quick start to using Python to manipulate gmail.com tonight. I did the following:
$ pip install --upgrade google-api-python-client oauth2client
Collecting google-api-python-client Downloading (141kB) (... SNIP ...)
You are using pip version 8.1.1, however version 18.1 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.So as you can see Ubuntu is still distributing 8.1.1 but now version 18.1 is available whereas a four months ago 10.0.1 was available.
I've read many times how people upgrading pip and python got burned so my advise would be to do nothing unless you run into problems and feel a forced upgrade is necessary to correct them.
I've learned the hard way "If it's not broken don't fix it".
Simply, try to modify the installation command:
pip3.5 install absl-pywith
pip3.5 install --user absl-py