Skip to content
Latchkey

poetry "SolverProblemError" / no matching version in CI

poetry's solver evaluated your constraints and could not find a version of a package that satisfies all of them at once. It raises SolverProblemError and explains which requirement it could not meet.

What this error means

poetry install or lock fails with "SolverProblemError: Could not find a matching version of package X" or "Because ... depends on ... which doesn't match any versions".

python
  SolverProblemError

  Because myapp depends on django (>=5.0) which requires Python >=3.10
  and the current project supports Python >=3.8, version solving failed.

Common causes

A constraint excludes every published version

Your pyproject.toml constraint (or a Python version cap) leaves no release of the dependency that fits.

A Python version range too wide for a dependency

Supporting an old Python in tool.poetry.dependencies.python can make a modern package unsolvable across that range.

How to fix it

Align the constraint with available versions

  1. Read which dependency and which constraint poetry names.
  2. Loosen or correct the version range in pyproject.toml.
  3. Run poetry lock to confirm the solver now succeeds.
Terminal
poetry add "django@>=5.0"
poetry lock

Narrow the supported Python range

If a dependency needs a newer Python, raise the project's minimum so the solver has a feasible set.

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

How to prevent it

  • Keep the supported Python range as tight as your dependencies allow.
  • Run poetry lock locally before pushing so conflicts surface early.
  • Upgrade dependencies in groups to keep constraints consistent.

Frequently asked questions

What causes ""SolverProblemError""?
Your pyproject.toml constraint (or a Python version cap) leaves no release of the dependency that fits.
How do I fix "SolverProblemError"?
Align the constraint with available versions

Related guides

References

Latchkey auto-heals failures like this one - detected, fixed, and retried without you. Start free → 30-day trial · No credit card