Pip Version Confusion

Steven D'Aprano steve+comp.lang.python at pearwood.info
Sat Mar 24 12:16:55 EDT 2018


On Sat, 24 Mar 2018 07:40:17 -0800, Tim Johnson wrote:

> I'm on Ubuntu 16.04.
> 
> I'm getting the following message from pip:
> 
> You are using pip version 8.1.1, however version 9.0.3 is available. You
> should consider upgrading via the 'pip install --upgrade pip' command.
[...]
> Not sure how to resolve - please advise, thanks


Well, what happens when you try running 

pip install --upgrade pip

as it says?


I expect that you've probably got two (or more!) pips installed, and 
somehow sometimes you get one and sometimes the other. The problem is, it 
seems to me, that we can get pip installed through at least three 
mechanisms:

- installing pip by hand, via source or some other mechanism;

- using ensure-pip in a sufficiently recent Python;

- using your OS's package manager.

And of course each version of Python can have its own pip.


To diagnose this, I would try:

Query your package manager, what version of pip does it say is installed?

How many versions of Python do you have installed? Which one are you 
running?

Precisely what command line did you give to get the message above?

If you cd out of whatever directory you are in, does the message change?

If you run pip as a different user, what happens?

If you run "locate pip", how many pip installations does it find, and 
what are they?


-- 
Steve




More information about the Python-list mailing list