Skip to content
Latchkey

Poetry "SolverProblemError" - Fix Version Conflicts in CI

Poetry’s resolver could not find a set of versions that satisfies every constraint in pyproject.toml. Two dependencies - or a dependency and your python range - are mutually exclusive.

What this error means

poetry lock or poetry install fails with SolverProblemError, explaining which constraints conflict. It is deterministic and reproduces locally with the same pyproject.toml.

poetry output
SolverProblemError

Because app depends on both urllib3 (>=2.0) and botocore (1.34.0)
 which depends on urllib3 (>=1.25.4,<1.27), version solving failed.

Common causes

Incompatible dependency constraints

Two packages require non-overlapping versions of a shared dependency. Poetry will not silently pick one - it reports the conflict.

A python constraint that excludes a release

Your [tool.poetry.dependencies] python = "^3.9" range may not overlap a dependency’s supported Python, leaving no solvable version.

How to fix it

Loosen or align the conflicting constraint

  1. Read which two requirements conflict in the error message.
  2. Relax your own caret/version pin so the ranges overlap.
  3. If two third-party packages conflict, upgrade the lagging one to a release that accepts the newer shared dependency.

Re-resolve and inspect verbosely

Terminal
poetry lock --no-cache
poetry install -vvv

Check the python constraint

Make sure your project’s python range overlaps every dependency. Narrow it if a dependency dropped old Pythons.

pyproject.toml
[tool.poetry.dependencies]
python = ">=3.10,<3.13"

How to prevent it

  • Commit poetry.lock and run poetry install (not lock) in CI.
  • Keep your python constraint aligned with your dependencies’ support.
  • Upgrade related packages together to keep shared deps compatible.

Related guides

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