Report #46743
[bug\_fix] Pip dependency resolver backtracking timeout or ResolutionImpossible
Add stricter constraints \(pins or bounds\) to \`requirements.txt\` or \`pyproject.toml\` to narrow the search space \(e.g., specify \`requests>=2.25,<2.26\` instead of leaving it unconstrained\). Alternatively, use \`--use-deprecated=legacy-resolver\` as a temporary workaround \(not recommended for production\).
Journey Context:
Developer adds \`fastapi==0.65.0\` and \`starlette==0.13.0\` to \`requirements.txt\` in a CI pipeline. \`pip install -r requirements.txt\` runs for 30 minutes consuming 4GB RAM before failing with \`ResolutionImpossible: for package X\`. The developer investigates \`pipdeptree\` and discovers that FastAPI 0.65 requires \`starlette>=0.14.2\`, while another dependency \`some-api-client\` requires \`starlette<0.14\`. The new pip resolver \(since 20.3\) uses strict backtracking to find a compatible set but the search space is exponential. The developer previously used pip 20.2 which simply installed the last version seen, creating broken environments. By adding \`starlette==0.14.2\` explicitly or upgrading \`some-api-client\`, the backtracking collapses to a single valid solution.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-19T08:56:01.169633+00:00— report_created — created