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.


$ pip install --upgrade pip
Collecting pip
  Downloading https://files.pythonhosted.org/packages/0f/74/ecd13431bcc456ed390b44c8a6e917c1820365cbebcb6a8974d1cd045ab4/pip-10.0.1-py2.py3-none-any.whl (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?


To upgrade pip using pip is a bit different than regular command. Use

python -m pip install --upgrade pip

Here python -m will read the pip library file as a script and you will be able to update.

| improve this answer | |

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 pip

Explanation 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.
| improve this answer | |
  • My first foray into Python tonight and it said: "You are using pip version 8.1.1, however version 18.1 is available.". Running pip --version returns: pip 8.1.1 from /usr/lib/python2.7/dist-packages (python 2.7). My plan is to do nothing unless a problem occurs then I'll look at upgrading. Ubuntu 16.04.5 LTS, Kernel 4.14.78. – WinEunuuchs2Unix Nov 7 '18 at 2:15
  • The results of pip -V after updating pip today are pip 18.1 - the same version as the latest pip version that is currently available - so the upgrade to pip 18.1 works, but as you wrote there's no reason to upgrade pip unless a problem occurs. – karel Nov 7 '18 at 5:44
  • Did nothing for me. I still get the same result for pip -V. – havakok Mar 27 '19 at 12:29
  • You may have an issue with the path to the pip3 executable file that is preventing your system from using the pip3 that is installed by sudo apt install python3-pip. This can be caused by installing another version of Python 3.x or by Anaconda (if you are using Anaconda) – karel Mar 27 '19 at 12:52

__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
| improve this answer | |

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 pip

globally or for specific versions/installations:

python -m pip install -U pip
python3 -m pip install -U pip
python3.8 -m pip install -U pip

On Windows:

python -m pip install -U pip


Cause line "python -m pip install --upgrade pip" from Installing packages using pip and virtual environments didn't work for me.

| improve this answer | |

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 https://files.pythonhosted.org/packages/4e/92/e4746e646585c8c359781c19984fe8b6b8794a6cfe382cd481329d5252ac/google-api-python-client-1.7.4.tar.gz (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".

| improve this answer | |

Simply, try to modify the installation command:

pip3.5 install absl-py


pip3.5 install --user absl-py

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.