-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Closed as not planned
Closed as not planned
Copy link
Labels
C: dependency resolutionAbout choosing which dependencies to installAbout choosing which dependencies to installstate: needs discussionThis needs some more discussionThis needs some more discussion
Description
Description
Given these wheels and dependencies:
root -> a == 1
root -> b == 1
b-1-py3-none-any.whl -> a == 2
b-1-py2.py3-none-any.whl -> a == 1
If you run a command like pip install a==1 b==1
then whether or not the resolving succeeds or not depends on whether it "saw" b-1-py3-none-any.whl
or b-1-py2.py3-none-any.whl
first.
It appears that when resolvelib rejects the first b 1
wheel it finds, it rejects b==1
as a whole, even though the second wheel in that set might resolve fine.
Expected behavior
I expect pip to select the wheel that makes the resolution able to succeed, or at least have consistent behavior regardless of which wheel it sees "first".
In the above scenario, b==1 a==1
and b==1 a==2
should be resolvable on py3.
pip version
25.2
Python version
3.13.3
OS
Linux
How to Reproduce
- Clone https://github.com/dstufft/pip-wheel-resolver-test
- Run
pip install --dry-run --no-index --find-links=file://$PWD/index a==1 b==1
. - Run
pip install --dry-run --no-index --find-links=file://$PWD/index a==2 b==1
.
Output
$ pip install --dry-run --no-index --find-links file://$PWD/index/ a==1 b==1
Looking in links: file:///home/dstufft/projects/pip-wheel-resolver-test/index/
Processing ./index/a-1-py3-none-any.whl
Processing ./index/b-1-py2.py3-none-any.whl
Would install a-1 b-1
$ pip install --dry-run --no-index --find-links file://$PWD/index/ a==2 b==1
Looking in links: file:///home/dstufft/projects/pip-wheel-resolver-test/index/
Processing ./index/a-2-py3-none-any.whl
Processing ./index/b-1-py2.py3-none-any.whl
INFO: pip is looking at multiple versions of b to determine which version is compatible with other requirements. This could take a while.
ERROR: Cannot install a==2 and b==1 because these package versions have conflicting dependencies.
The conflict is caused by:
The user requested a==2
b 1 depends on a==1
To fix this you could try to:
1. loosen the range of package versions you've specified
2. remove package versions to allow pip to attempt to solve the dependency conflict
ERROR: ResolutionImpossible: for help visit https://pip.pypa.io/en/latest/topics/dependency-resolution/#dealing-with-dependency-conflicts
Code of Conduct
- I agree to follow the PSF Code of Conduct.
pradyunsg and DEKHTIARJonathan
Metadata
Metadata
Assignees
Labels
C: dependency resolutionAbout choosing which dependencies to installAbout choosing which dependencies to installstate: needs discussionThis needs some more discussionThis needs some more discussion