Report #10606
[bug\_fix] Pip resolver backtracking / hanging on dependency resolution
Pin transitive dependencies explicitly in requirements.txt to constrain the search space \(e.g., package<2.0\). Use pip-tools or Poetry to generate a lock file. As a temporary workaround, use --use-deprecated=legacy-resolver \(not recommended for production\).
Journey Context:
Developer adds 'django>=4.0' to requirements.txt alongside old 'celery==4.4'. Runs 'pip install -r requirements.txt'. Pip starts logging 'Collecting django' and 'Found conflicting dependencies', appearing to hang for 30 minutes consuming CPU. Developer Ctrl-Cs, searches 'pip taking forever'. Discovers the new resolver \(pip 20.3\+\) performs strict backtracking. Checks dependency tree and realizes Celery 4.4 depends on Django<4.0. Pins Celery to 5.x in requirements. Install completes in seconds. The fix works because constraining the version range eliminates the exponential search path the resolver must explore to find a compatible set.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-16T11:12:08.515756+00:00— report_created — created