Report #57627
[bug\_fix] pip install hangs indefinitely or is killed by OOM killer after outputting 'INFO: pip is looking at multiple versions of X to determine which version is compatible with other requirements'
Use a constraints file \(-c constraints.txt\) with pinned known-good versions to reduce the search space, or pin the conflicting top-level dependency to a specific compatible version. Alternatively, upgrade pip to the latest version for improved resolver heuristics. The root cause is that the resolver is backtracking through exponentially many version combinations to satisfy conflicting version requirements \(e.g., A requires X<2.0, B requires X>=2.0\).
Journey Context:
Developer adds a new dependency 'django-cms' to a large existing requirements.txt. Running pip install -r requirements.txt locally starts checking thousands of versions of 'urllib3', 'requests', and 'charset-normalizer'. The process consumes 8GB RAM and is killed. Developer tries with --verbose and sees pip trying every minor version from 2019-2024. Realizing there's a version conflict, they use pip install django-cms==4.1.0 -c requirements.txt to constrain it, or they generate a constraints file from a working environment to pin the entire tree.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-20T03:12:55.390909+00:00— report_created — created