-
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
--ignore-requires-python
has no effect
#6371
Comments
I'm ok with this being closed as "works as intended" though the option should probably be deprecated and/or removed if it has no effect |
Are you able to get the install to work by passing something for |
nope:
|
I even reverted back to when it was introduced -- it didn't work then either: $ pip install git+https://github.com/pypa/pip@8df742e56db99c48f7ad85085501fe23456b419c
Collecting git+https://github.com/pypa/pip@8df742e56db99c48f7ad85085501fe23456b419c
Cloning https://github.com/pypa/pip (to revision 8df742e56db99c48f7ad85085501fe23456b419c) to ./pip-req-build-mdzrw938
Building wheels for collected packages: pip
Building wheel for pip (setup.py) ... done
Stored in directory: /tmp/pip-ephem-wheel-cache-3htnnj3r/wheels/f4/06/5d/1652f21a0ecf6bed88b63647ec859e0384f0f07fcae05c57f3
Successfully built pip
Installing collected packages: pip
Found existing installation: pip 19.0.3
Uninstalling pip-19.0.3:
Successfully uninstalled pip-19.0.3
Successfully installed pip-8.2.0.dev0
$ pip install --ignore-requires-python black
Collecting black
Cache entry deserialization failed, entry ignored
Could not find a version that satisfies the requirement black (from versions: )
No matching distribution found for black
You are using pip version 8.2.0.dev0, however version 19.0.3 is available.
You should consider upgrading via the 'pip install --upgrade pip' command. |
The ignore-requires option wasn’t meant to be used for the purpose you’re trying to use it. I was wondering if another option could help though. |
my reading of #3846 especially these comments seems to indicate it is intended for this: The |
When you're trying |
When installing a package, Python performs a check of the pip/src/pip/_internal/resolve.py Lines 298 to 304 in ac9010e
The In your case, it's rejecting the package before even getting to that point (before it's even downloaded), so the command option isn't coming into play. The |
Okay, it looks like there is a second application of pip/src/pip/_internal/index.py Lines 852 to 863 in ac9010e
|
PS - the most important part of the log messages in your OP are getting hidden by default because GitHub doesn't wrap the long lines when using the fixed-width formatting:
I didn't see that until now. |
(Note that the wheels will still get rejected without using —python-version.) |
😆 I'm glad you finally took the time to look instead of assuming I'm wrong I've been following closely the |
Out of curiosity, what does it mean to pass |
FWIW,
It might still be interesting to also use it in |
I posted PR #6518 to address this. |
One issue that comes up when considering this is that pip's |
Incidentally, @xavfernandez, my comment / question above relates to the review comment you made less than a week ago on one of my PR's as to whether |
@cjerdonek Maybe we should migrate |
@xavfernandez Something like that sounds good. However, the other issue is that because |
Wheels selection is based on the most precise/matching first, so |
…thon Fix #6371: make pip install respect --ignore-requires-python
I just posted PR #6539 to work towards this. |
FYI, I just filed PR #6577, which does the above, |
Environment
Description / Expected behaviour / How to Reproduce
I expect this to succeed:
$ ./venv/bin/pip install --ignore-requires-python black -v
black requires
python>=3.6
, though I am running pypy3.5 and explicitly asking pip to--ignore-requires-python
Output
The text was updated successfully, but these errors were encountered: