Skip to content
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

python get-pip.py fails for pip 10 #5220

Closed
ybizeul opened this issue Apr 14, 2018 · 11 comments
Closed

python get-pip.py fails for pip 10 #5220

ybizeul opened this issue Apr 14, 2018 · 11 comments
Labels
auto-locked Outdated issues that have been locked by automation

Comments

@ybizeul
Copy link

ybizeul commented Apr 14, 2018

  • Pip version: none
  • Python version: 2.7.9
  • Operating system: Debian 8.10

Description:

Simply running python get-pip.py fails, as if it sees itself installed in /tmp after downloading

What I've run:

root@nabox:/usr/local/nabox/products# python get-pip.py
Requirement already up-to-date: pip in /tmp/tmpKtk1bS/pip.zip (10.0.0)

Workaround is to force pip9 then upgrade

root@nabox:/usr/local/nabox/products# python get-pip.py 'pip==9'
Collecting pip==9
  Downloading pip-9.0.0-py2.py3-none-any.whl (1.3MB)
    100% |################################| 1.3MB 6.7MB/s 
Installing collected packages: pip
Successfully installed pip-9.0.0
You are using pip version 9.0.0, however version 10.0.0 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
root@nabox:/usr/local/nabox/products# pip install --upgrade pip
Cache entry deserialization failed, entry ignored
Collecting pip
  Downloading pip-10.0.0-py2.py3-none-any.whl (1.3MB)
    100% |################################| 1.3MB 1.2MB/s 
Installing collected packages: pip
  Found existing installation: pip 9.0.0
    Uninstalling pip-9.0.0:
      Successfully uninstalled pip-9.0.0
Successfully installed pip-10.0.0
@pfmoore
Copy link
Member

pfmoore commented Apr 14, 2018

Thanks for the report! This is also logged as pypa/get-pip#19, as it's likely to be an issue with how get-pip bootstraps the install of pip. An alternative workaround is to use --force-reinstall or --ignore-installed when running get-pip.py.

@ybizeul
Copy link
Author

ybizeul commented Apr 14, 2018

Will test right away and report! thanks

@jesterhazy
Copy link

fails the same way in docker image based on ubuntu:16.04

@pfmoore
Copy link
Member

pfmoore commented Apr 14, 2018

Sorry, do you mean python get-pip --force-reinstall fails with "Requirement already up-to-date: pip in /tmp/..."? That's odd because that command worked fine when I tested it (on Windows, so the systems aren't the same, but the problem shouldn't be OS-dependent).

@jesterhazy
Copy link

@pfmoore no, just adding that the usual no-arg command also fails in ubuntu.

@pfmoore
Copy link
Member

pfmoore commented Apr 14, 2018

Oh, right. Yes, it's not OS-dependent so I expect it'l fail the same everywhere. But thanks for taking the time to confirm it.

@dstufft
Copy link
Member

dstufft commented Apr 15, 2018

I wonder if the version of setuptools pip 10 has embedded is smart enough to see a wheel added to the sys.path as "installed", and maybe the 9.x version wasn't?

@dstufft
Copy link
Member

dstufft commented Apr 15, 2018

Yup, 9.03 had pkg_resources from 28.8.0 and 10.0.0 has it from 10.0.0, and from the setuptools changelog:

v34.2.0
12 Feb 2017

So when previously pkg_resources didn't see the dist-info inside of the wheel that it bundled, it now does and thus is installs. I see two reasonable ways past it:

  • Have get-pip.py automatically add --force-reinstall to the command line arguments it uses.
  • Have the get-pip.py generator unpack the wheel, and repack it without the dist-info directory so that pkg_resources again does not see it as installed.

@dstufft
Copy link
Member

dstufft commented Apr 15, 2018

As of pypa/get-pip@ba67ea6 this should be fixed, it can take some time for the various automation machinery to pull in the updated get-pip.py so that it's updated and fixed at bootstrap.pypa.io/get-pip.py.

@dstufft dstufft closed this as completed Apr 15, 2018
@pfmoore
Copy link
Member

pfmoore commented Apr 15, 2018

Nice catch! Thanks, @dstufft

@lock
Copy link

lock bot commented Jun 2, 2019

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.

@lock lock bot added the auto-locked Outdated issues that have been locked by automation label Jun 2, 2019
@lock lock bot locked as resolved and limited conversation to collaborators Jun 2, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
auto-locked Outdated issues that have been locked by automation
Projects
None yet
Development

No branches or pull requests

4 participants