-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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 --user -U <package> fails to upgrade packages #5174
Comments
Hm, I cannot reproduce this with a different package (pov-fabric-helpers):
Now I'm using 10.0.0b2 installed from PyPI. When I filed this bug I was using 10.0.0b2 from a git snapshot mentioned in #5160 (comment). |
@pradyunsg ping - is this likely to be related to your fix #5162? |
I don't think so. That PR doesn't affect what gets installed. |
I've downgraded
(Ignore the "requires X which is not installed" errors, those are #5160.) So there must be something different between freezegun and pip-fabric-helpers? Perhaps there's another package that depends on |
I do not know why pip 10 thinks freezegun is at version 0.3.10. Is there some cache that got stale when pip 9 downgraded freezegun? If I check
|
What does pip freeze show? |
|
What about pip 9? |
oh hey, pip 9 also thinks the version is 0.3.10?!?
|
I still have the original downgrade command in my scrollback. It was
|
Hmm
|
Let's see what happens if I clean this up
And now trying to reproduce the original issue
Cannot reproduce it! However
seems wrong. |
Yeah, that looks wrong. Probably caused by doing a Basically #5176 that you raised earlier, rearing its ugly head when you're doing an upgrade (which is uninstall + install, effectively). |
I cannot reproduce this even after installing the snapshot again:
I cannot explain my original experience. :/ |
Do you have an activated venv? |
It's not activated per se (it's not in $PYTHONPATH), but its |
@mgedmin Being on |
pip is absolutely from that virtualenv (via a wrapper script, which should not matter). (The purpose of that virtualenv is so I can use pip to put tools on my $PATH, without having to use sudo. |
OK. So that's your issue - "not uninstalling ..., outside environment" is because you're using the pip from that environment and it is not able to uninstall code that wasn't installed into that environment's site-packages. Hence the brokenness on upgrades. |
Yeah, #5176 basically. (It's a bit strange that pip from an activated virtualenv can happily But the original point of this bug was not that pip botched the upgrade by not removing the stale dist-info. It was that pip refused to even consider the upgrade. If only I could repro... hey. Now that I remember, what I did was write a shell script
and then got that original error. Could it be that freezegun is a dependency of, say, tornado? Could it be that pip 10 refuses to upgrade packages that are dependencies of other packages, even if you explicitly ask for both packages to be upgraded? Further checking ( I think it may be best to close this bug report, since I can't reproduce the original issue, and the side issues encountered during the various experiments have their own issues filed. |
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Description:
I ran
pip list --user --outdated
, saw that I hadfreezegun
0.3.7 in my ~/.local/lib/python2.7/site-packages, and tried to upgrade it withpip install --user -U freezegun
. This did not work:Then I downgraded pip to 9.0.3 with
pip install "pip<10"
and tried thepip install --user -U freezegun
again, and it successfully upgraded the freezegun ... I think?(Despite the scary "not uninstalling ..., outside environment" warning,
pip list --user
confirms that I've freezegun 0.3.10 in my ~/.local/lib/python2.7/site-packages now.)The text was updated successfully, but these errors were encountered: