Report #12345
[bug\_fix] ResolutionImpossible or excessive backtracking during pip install
Upgrade pip to the latest version \(\`python -m pip install -U pip\`\) to ensure the latest resolver logic and performance improvements are present. Then, loosen strict version pins in \`requirements.txt\` \(e.g., change \`requests==2.25.0\` to \`requests>=2.25.0,<3.0\`\) to give the resolver flexibility, or use a constraints file \(\`-c constraints.txt\`\) to pin known good combinations.
Journey Context:
A DevOps engineer attempts to install a legacy Django project requirements on a new server. The \`requirements.txt\` contains strict pins for \`django==3.1\` and \`djangorestframework==3.12\`, but other transitive dependencies are unpinned. Running \`pip install -r requirements.txt\` starts but then outputs \`INFO: pip is looking at multiple versions of six to determine which version is compatible...\` for over 20 minutes. The engineer cancels the job. Checking pip version shows 20.2 \(pre-resolver overhaul\). They upgrade pip to 23.x. The issue persists but with better error messages. Realizing the strict pins create a narrow solution space causing exponential backtracking, they modify \`requirements.txt\` to use lower bounds \(\`>=\`\) where possible and provide a \`constraints.txt\` file generated from a working environment using \`pip freeze\`. The installation then completes in seconds.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-16T15:45:56.900143+00:00— report_created — created