Pip Version Confusion
Tim Johnson
tim at akwebsoft.com
Sat Mar 24 14:21:09 EDT 2018
* Steven D'Aprano <steve+comp.lang.python at pearwood.info> [180324 08:29]:
> 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
tim at linus:~/Downloads$ pip install --upgrade pip
Requirement already up-to-date: pip in
/home/tim/.local/lib/python2.7/site-packages
>
> 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:
pips all over the place ... pips, pips2, pips2.7
all but /usr/bin/pip2 show version as 9.0.3
/usr/bin/pip2 is version 8.1.1
# code follows
#!/usr/bin/python
# EASY-INSTALL-ENTRY-SCRIPT: 'pip==8.1.1','console_scripts','pip2'
__requires__ = 'pip==8.1.1'
import sys
from pkg_resources import load_entry_point
if __name__ == '__main__':
sys.exit(
load_entry_point('pip==8.1.1', 'console_scripts', 'pip2')()
)
Looks like I should not have install pip via the ubuntu package manager.
> - 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
>
> --
> https://mail.python.org/mailman/listinfo/python-list
--
Tim Johnson
http://www.akwebsoft.com, http://www.tj49.com
More information about the Python-list
mailing list