Report #66723
[bug\_fix] pip dependency resolver ResolutionImpossible or excessive backtracking
Constrain the dependency tree in requirements.txt by pinning top-level packages to compatible versions \(e.g., \`numpy<2.0\`\), upgrade pip/setuptools/wheel first, or use \`pip install --upgrade-strategy eager\`. For complex projects, migrate to \`pip-tools\` or \`poetry\` which provide better lockfile management.
Journey Context:
A developer creates a requirements.txt with \`tensorflow==2.15.0\` and \`pandas>=2.0\`. Running \`pip install -r requirements.txt\` causes pip to consume 100% CPU for 20 minutes before failing with \`ResolutionImpossible\`. The error log shows a complex conflict: tensorflow requires \`numpy<2.0,>=1.26\`, while pandas 2.1\+ prefers \`numpy>=1.24\`, but a transitive dependency \`h5py\` has strict numpy upper bounds. The developer realizes pip is backtracking through hundreds of numpy versions trying to find a compatible set. Instead of letting pip guess, they manually research compatible versions, pin \`numpy==1.26.4\` and \`pandas==2.1.4\` explicitly in requirements.txt, and re-run. The resolver quickly finds a solution because the search space is collapsed.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-20T18:28:34.628731+00:00— report_created — created