/errors/uv/no-solution-found-when-resolving-dependencies
uv: error: No solution found when resolving dependencies
- tool
- uv
- exit code
- 1
- versions
- uv 0.5 – 0.12
- os
- any
error: No solution found when resolving dependencies means uv could not find one set of versions that satisfies every requirement at once. The cause: lines that follow explain why, as a chain of Because ... we can conclude ... steps; the last step names the requirements that cannot both be true. Loosen or remove one of them (usually an explicit pin) and run uv lock again.
Reproduce it
requests 2.32.3 needs urllib3>=1.21.1,<3, but the project also pins urllib3==1.0:
cat > pyproject.toml <<'EOF'
[project]
name = "demo"
version = "0.1.0"
requires-python = ">=3.13"
dependencies = ["requests==2.32.3", "urllib3==1.0"]
EOF
uv lock --python 3.13 2>&1 | grep -v '^Using '
exit "${PIPESTATUS[0]}"Output · exit 1
error: No solution found when resolving dependencies
cause: Because requests==2.32.3 depends on urllib3>=1.21.1,<3 and your project depends on requests==2.32.3, we can conclude that your project depends on urllib3>=1.21.1,<3.
And because your project depends on urllib3==1.0, we can conclude that your project's requirements are unsatisfiable.The Using CPython ... line, which names the local interpreter, is filtered out.
Fix
Remove the conflicting pin and let uv choose a compatible urllib3:
cat > pyproject.toml <<'EOF'
[project]
name = "demo"
version = "0.1.0"
requires-python = ">=3.13"
dependencies = ["requests==2.32.3"]
EOF
uv lock --python 3.13 -q && echo "resolved"Output
resolved
Reading the explanation
Read the chain from the first Because to the final your project's requirements are unsatisfiable. Each step combines two facts; the two facts that cannot hold together are the ones to change.
| The chain mentions | What to change |
|---|---|
| Two of your own requirements on the same package | Remove or relax one of the pins |
| A version that is not available | The release is not published, or not on the configured index |
| A Python version | Raise requires-python, or pick an older release of the package |
| A prerelease | Request it explicitly, or pass --prerelease allow |