5

Whenever I use pip, it warns me that my pip is out of date and that I need to upgrade it by doing pip install --upgrade pip.

But when I do that it seemingly has no effect and simply tells me the same thing. It's circular!

How can I fix this? See below

$ pip install --upgrade pip
You are using pip version 6.0.8, however version 8.1.1 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
Requirement already up-to-date: pip in my-virtualenv/lib/python2.7/site-packages

EDIT: I'm running Red Hat Enterprise Linux (on AWS). So I just tried uninstalling and reinstalling python-pip. When I did that it tells me it will install pip 6.1.1.-1.21.amzn1. How can I make it install the newer version??

Saqib Ali
  • 11,931
  • 41
  • 133
  • 272
  • 3
    Did you try `--quiet` ? Or `pip install --upgrade pip==8.1.1` ? – Till Apr 04 '16 at 19:02
  • 1
    If you have python 2 and 3 installed on your computer make sure you're upgrading the correct version of pip. Use `pip2` or just `pip` for python 2 and `pip3` for python 3. – RobertR Apr 04 '16 at 19:05
  • 2
    Haha `--quiet` suppresses everything *except* the obnoxious warning. Gotta love `pip`. – personal_cloud Sep 18 '17 at 21:49
  • 1
    The warning might as well say `Version 6.0.8 used to work on your system, in fact RH shipped with it. But pip likes to go out and break itself from time to time.` – personal_cloud Sep 18 '17 at 21:52

3 Answers3

3

This one was resolved here:

How to suppress pip upgrade warning?

There is a known issue with pip where it will print that warning even if you have the version of pip that shipped with your OS. It is safe to get rid of the warning with this command:

mkdir -p $HOME/.config/pip
printf "[global]\ndisable-pip-version-check = True\n" \
  > $HOME/.config/pip/pip.conf
personal_cloud
  • 3,943
  • 3
  • 28
  • 38
0

You need to run:

pip install --upgrade pip

twice.

The first time it upgrades to version 8.1.0 and the second time to 8.1.1. After this there will be no warnings anymore.

Mike Müller
  • 82,630
  • 20
  • 166
  • 161
  • 1
    That didn't work. It stays the same no matter how many times I run it. – Saqib Ali Apr 04 '16 at 19:16
  • 1
    Doesn't answer the question about how to suppress the warning. – personal_cloud Sep 18 '17 at 21:47
  • 1
    Thanks. Twice running `pip install --upgrade pip` solved warning `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.` – baltasvejas Dec 31 '17 at 10:34
0

You can install pip using system package manager,

for ubuntu/debian: apt-get install python-pip

for arch: pacman -S python-pip

In this the package manager will update pip every time a new version will be available for your distribution.

tmms
  • 116
  • 1
  • 5