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

Pip fails to install satisfiable requirements due to bug in backjumping optimization #12317

Open
1 task done
notatallshaw opened this issue Oct 4, 2023 · 1 comment
Open
1 task done
Labels
C: dependency resolution About choosing which dependencies to install type: bug A confirmed bug or unintended behavior

Comments

@notatallshaw
Copy link
Contributor

notatallshaw commented Oct 4, 2023

Description

On Python 3.9 Linux pip fails to install with the following requirements:

pandas>=1.3.5,<=1.4.0
pystac>=1.8.2,<=1.8.3
pystac-client>=0.3.2,<=0.3.3
sat-stac<=0.1.1

Expected behavior

Should install the satisfiable requirements:

pandas==1.3.5
pystac==1.8.3
pystac-client==0.3.3
sat-stac==0.1.1

pip version

23.2.1

Python version

3.9

OS

Linux

How to Reproduce

python3.9 -m venv .venv
source .venv/bin/activate
python -m pip install pip --upgrade
pip install "pandas>=1.3.5,<=1.4.0" "pystac>=1.8.2,<=1.8.3" "pystac-client>=0.3.2,<=0.3.3" "sat-stac<=0.1.1"

Output

INFO: pip is looking at multiple versions of pystac-client to determine which version is compatible with other requirements. This could take a while.
ERROR: Cannot install pystac-client==0.3.2 and pystac<=1.8.3 and >=1.8.2 because these package versions have conflicting dependencies.

The conflict is caused by:
    The user requested pystac<=1.8.3 and >=1.8.2
    pystac-client 0.3.2 depends on pystac~=1.2.0

To fix this you could try to:
1. loosen the range of package versions you've specified
2. remove package versions to allow pip 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

Context

This is a regression since Pip 23.1 which vendored resolvelib which included this change to backtracking: sarugaku/resolvelib#113

There is already an issue on resolvelib side: sarugaku/resolvelib#134

But given this has a bigger impact because it causes Pip to fail to install requirements when there is a valid solution I feel there should be an issue on Pip side until it is resolved.

@notatallshaw notatallshaw added S: needs triage Issues/PRs that need to be triaged type: bug A confirmed bug or unintended behavior labels Oct 4, 2023
@notatallshaw notatallshaw changed the title Pip fails to install satisfiable requirements Pip fails to install satisfiable requirements due to bug in backtracking Oct 28, 2023
@notatallshaw notatallshaw changed the title Pip fails to install satisfiable requirements due to bug in backtracking Pip fails to install satisfiable requirements due to bug in backjumping optimization Oct 28, 2023
@ichard26 ichard26 added C: dependency resolution About choosing which dependencies to install and removed S: needs triage Issues/PRs that need to be triaged labels Apr 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C: dependency resolution About choosing which dependencies to install type: bug A confirmed bug or unintended behavior
Projects
None yet
Development

No branches or pull requests

3 participants
@notatallshaw @ichard26 and others