pip "ResolutionImpossible" dependency conflict in CI
pip's resolver backtracked through candidate versions and proved no install set satisfies every constraint at once. It raises ResolutionImpossible and prints the conflicting requirements.
What this error means
After "INFO: pip is looking at multiple versions...", pip stops with "ERROR: ResolutionImpossible" and a list of the requirements that collide. It reproduces identically every run.
ERROR: Cannot install -r requirements.txt (line 1) and urllib3==2.2.0 because these
package versions have conflicting dependencies.
ERROR: ResolutionImpossible: for help visit
https://pip.pypa.io/en/latest/topics/dependency-resolution/#dealing-with-dependency-conflictsCommon causes
Two requirements pin incompatible ranges
One package needs urllib3<2 while another needs urllib3>=2. No single version is in both ranges, so resolution is impossible.
A lagging package caps a shared transitive dependency
An older library caps a shared dependency below what a newer library now requires; until you upgrade the lagging one, the cap blocks resolution.
How to fix it
Read the conflict and loosen or upgrade
- Read which two requirements pin the shared package.
- Upgrade the package that holds the lower cap to a release that accepts the version you need.
- If a direct pin is too tight, widen it to a range that overlaps every dependency.
# upgrade the capping library so urllib3>=2 is allowed
pip install "botocore>=1.34" "urllib3==2.2.0"Resolve once with a lockfile tool
Compile a lockfile so the conflict surfaces at compile time, deterministically, before it reaches CI.
pip install pip-tools
pip-compile requirements.inHow to prevent it
- Upgrade related packages together so shared deps stay compatible.
- Prefer ranges over hard
==pins in your own requirements. - Commit a lockfile so the resolver runs once, not on every CI job.