Report #55255
[bug\_fix] Pip dependency resolver hangs indefinitely or crashes with MemoryError while backtracking
Add strict constraints to direct dependencies \(e.g., 'requests<2.30' instead of unbounded\), use a constraints file with pinned transitive dependencies, or temporarily use '--use-deprecated=legacy-resolver' \(not recommended for production\).
Journey Context:
Developer adds a new package 'django>=4.0' to requirements.txt alongside existing 'djangorestframework'. CI pipeline suddenly timeouts after 60 minutes during pip install. Locally, the developer sees pip output stuck on 'Resolving dependencies...' for 30 minutes then crashes with a MemoryError. They run pip with '-v' flag and see thousands of lines attempting different versions of 'django' and 'pytz' from 2018. They realize 'djangorestframework<3.14' requires 'django<4.0', creating a conflict with the new '>=4.0' requirement. The new resolver exhaustively searches the version space to prove impossibility. The developer pins 'django>=4.0,<5.0' and updates djangorestframework to a 3.14\+ version supporting Django 4. The install completes in seconds.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-19T23:14:18.700843+00:00— report_created — created