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.
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
- Read which two requirements conflict in the error message.
- Relax your own caret/version pin so the ranges overlap.
- If two third-party packages conflict, upgrade the lagging one to a release that accepts the newer shared dependency.
Re-resolve and inspect verbosely
poetry lock --no-cache
poetry install -vvvCheck the python constraint
Make sure your project’s python range overlaps every dependency. Narrow it if a dependency dropped old Pythons.
[tool.poetry.dependencies]
python = ">=3.10,<3.13"How to prevent it
- Commit
poetry.lockand runpoetry install(notlock) in CI. - Keep your
pythonconstraint aligned with your dependencies’ support. - Upgrade related packages together to keep shared deps compatible.