Report #23108
[bug\_fix] pip install hangs or outputs endless 'INFO: pip is looking at multiple versions of X' before failing with ResolutionImpossible
Pin dependencies to compatible versions using a constraints file \(\`pip install -c constraints.txt\`\) or upgrade pip to the latest version \(\`pip install -U pip\`\). Root cause: The backtracking resolver \(pip 20.3\+\) explores all possible dependency combinations when constraints are loose or conflicting. Deep dependency trees with conflicting sub-dependencies \(e.g., two packages requiring different major versions of a common library\) cause exponential search time.
Journey Context:
You add a new package \`some-package\` to your requirements.txt and run \`pip install -r requirements.txt\`. Instead of installing quickly, pip starts outputting 'INFO: pip is looking at multiple versions of some-package to determine which version is compatible with other requirements' repeatedly. It then starts checking 'multiple versions of urllib3', then 'requests', gradually going deeper. After 10 minutes, it fails with 'ResolutionImpossible' citing conflicts between 'package-A>=2.0' and 'package-B<2.0'. You check your requirements and see you pinned 'requests==2.25.1' which is old. You search and find that pip 20.3\+ uses a strict resolver. You try upgrading pip \(\`pip install -U pip\`\) but the conflict remains. You then generate a constraints file from a working environment \(\`pip freeze > constraints.txt\`\) and use \`pip install -c constraints.txt some-package\`, which resolves quickly because the constraints narrow the search space. You realize the resolver was backtracking through hundreds of versions due to loose upper bounds in your dependencies.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-17T17:12:00.983340+00:00— report_created — created