-
Notifications
You must be signed in to change notification settings - Fork 3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
pip install --upgrade
reports wrong version on success
#2382
Comments
Only happens when "Using cached" i.e. second time you upgrade... initial install reports correctly:
|
It doesn't seem to come from "Using cached":
What is strange is that your first report finds a 6.0.6 installed pip but does not show the "You are using pip version 6.0.6, however version 6.0.7 is available." message. |
My scenario was... first upgrade was inside an existing virtualenv. Then I upgraded the system So possibly problem is virtualenv related |
I believe i saw this recently in my dev environment, pkg_resources.WorkingSet() was returning cached data even for a new instance. |
I also appear to be encountering this issue in a Travis CI instance, but interestingly only when I use
|
@cviner thats very different - its just that your PYTHONPATH doesn't pickup the newly installed pip. |
That was my initial suspicion, but it doesn't seem to account for the concluding message of the |
Oh! I see. well, worth a closer look. |
@rbtcollins glad you agree and thanks for the prompt feedback! |
It seems that this problem is caused when the upgraded version of the package goes to a different directory than the version being upgraded. I can reliably trigger the bug by upgrading a globally installed package using --user. Here's a detailed example: # Make sure the user site is preferred
$ export PATH=~/.local/bin:$PATH
$ export PYTHONPATH=~/.local/lib/python2.7/site-packages:$PYTHONPATH
# Avoid confusion when new pip binary appears in earlier in $PATH
$ shopt -s checkhash
# Using the globally installed pip...
$ type pip
pip is /usr/local/bin/pip
$ pip --version
pip 6.0.6 from /usr/local/lib/python2.7/dist-packages (python 2.7)
# Upgrade pip using --user - globally installed version number is incorrectly shown as being installed.
$ pip install --upgrade --user pip
Collecting pip from https://pypi.python.org/packages/py2.py3/p/pip/pip-7.1.2-py2.py3-none-any.whl#md5=5ff9fec0be479e4e36df467556deed4d
Using cached pip-7.1.2-py2.py3-none-any.whl
Installing collected packages: pip
Successfully installed pip-6.0.6
# But the correct version is actually installed...
$ type pip
pip is /home/menno/.local/bin/pip
$ pip --version
pip 7.1.2 from /home/menno/.local/lib/python2.7/site-packages (python 2.7) |
Same problem here with
The |
Hopefully fixed by #3723 |
When upgrading, pip reports that it "Successfully installed" the version it just upgraded from.
Actual upgrade seems to have succeeded, it's just the success message is wrong.
The text was updated successfully, but these errors were encountered: