Skip to content
Latchkey

pip "ResolutionImpossible" - Fix Dependency Conflicts in CI

pip’s resolver could not find a single set of versions that satisfies every requirement at once. Two of your dependencies demand incompatible versions of a shared transitive package.

What this error means

pip install runs the resolver, backtracks through many candidate versions, and finally gives up with ResolutionImpossible, listing the conflicting requirements. It is deterministic - the same inputs fail the same way every time.

pip output
ERROR: Cannot install app and urllib3==2.2.1 because these package versions have conflicting dependencies.

The conflict is caused by:
    app depends on urllib3==2.2.1
    botocore 1.34.0 depends on urllib3<1.27 and >=1.25.4

ERROR: ResolutionImpossible: for help visit
https://pip.pypa.io/en/latest/topics/dependency-resolution/

Common causes

Two dependencies pin incompatible shared versions

Package A needs urllib3<1.27 while package B needs urllib3==2.x. No single version satisfies both, so the resolver cannot proceed.

An over-tight pin in your own requirements

A hard == pin you added conflicts with what a dependency requires. Loosening your pin to a compatible range often resolves it.

How to fix it

Read the conflict and relax a pin

  1. Identify the shared package and the two incompatible constraints in the error.
  2. Loosen your own == pin to a range (>=,<) that overlaps both, if one exists.
  3. If the conflict is between two third-party packages, upgrade the older one to a release that accepts the newer shared dependency.

Let the resolver show all conflicts

Re-run verbosely so you see the full backtracking path and every constraint involved.

Terminal
pip install -v -r requirements.txt

Use a lockfile tool for reproducibility

Tools like pip-tools or uv resolve once and emit a pinned lockfile, surfacing conflicts at compile time instead of in CI.

Terminal
pip install pip-tools
pip-compile requirements.in   # fails loudly on conflict, before CI

How to prevent it

  • Pin with ranges, not hard ==, unless a hard pin is genuinely required.
  • Use a lockfile (pip-tools, uv, poetry) so conflicts surface at compile time.
  • Upgrade related packages together so shared transitive deps stay compatible.

Related guides

Tired of flaky CI? Latchkey auto-heals failed jobs and retries them for you. Start free →