-
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 download --python-version
fails when downloaded package doesn't support the Python version running pip
#5369
Comments
I'm personally not sure what's supposed to happen here. I'm not familiar with Python-Requires behaviors. Maybe someone else from @pypa/pip-committers is. |
I was surprised by this behaviour as well. I'm trying to use "pip download" to gather required packages for deployment elsewhere, and this makes it extremely difficult to do so. It's odd that "pip download" is inconsistent here -- it pays attention to python version in the PackageFinder, but not here. |
I'd say this is a valid bug: pip should not check |
I posted PR #6528, which will help with this issue. |
FYI, I posted PR #6577 to address this issue. |
Thanks for working on this @cjerdonek! :-) |
Description:
I'm using
pip download
to download packages for a different version of Python than the version that pip is running on. Specifically, I'm using pip on Python 2.7 to download packages for Python 3.5. The wheel for Python 3.5 is downloaded successfully, butpip download
exits with an error since the wheel specifies a minimum Python version of 3.4.Setting
ignore_requires_python=True
inpip/_internal/commands/download.py
turns the error into a warning (which still isn't ideal), but would the proper fix be forcheck_requires_python
to consider the Python version passed to thedownload
command?What I've run:
With verbose output, the last part of the output is:
The text was updated successfully, but these errors were encountered: