Report #64651
[bug\_fix] pip install hangs or fails with \`ResolutionImpossible\` or excessive backtracking \(1000000 rounds\)
Provide a constraints file \(\`pip install -c constraints.txt -r requirements.txt\`\) that pins a specific, compatible version of the conflicting transitive dependency to reduce the search space, or manually resolve the conflict by inspecting the error output and pinning compatible versions.
Journey Context:
A developer adds \`package-a==2.0.0\` to a large legacy \`requirements.txt\` and runs \`pip install -r requirements.txt\`. The command appears to hang, consuming 100% CPU for over 15 minutes. They cancel it with Ctrl-C and retry with \`-v\` \(verbose\) and \`--progress-bar off\`. The output streams endless lines like "INFO: pip is looking at multiple versions of package-x to determine which version is compatible with other requirements." Realizing this is the dependency resolver backtracking through millions of combinations, they wait for it to crash. It finally exits with \`ResolutionImpossible\`, showing a complex conflict tree where \`package-a\` requires \`package-c>=2.0\`, while another dependency \`package-b\` pins \`package-c<2.0\`. Instead of letting pip exhaustively search, the developer creates a \`constraints.txt\` file pinning \`package-c==2.0.1\` \(which satisfies both constraints after checking changelogs\). Running \`pip install -c constraints.txt -r requirements.txt\` now resolves in 3 seconds.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-20T15:00:04.651943+00:00— report_created — created