Report #94282
[bug\_fix] Pip hangs or outputs 'This is taking longer than usual. You may need to provide the dependency resolver with stricter constraints.'
Pin your direct dependencies to specific compatible versions \(e.g., \`django==4.2.0\` instead of \`django\`\) in your requirements file. This reduces the search space for the resolver, preventing exponential backtracking through incompatible transitive dependency versions.
Journey Context:
Developer runs \`pip install django djangorestframework\` in a fresh environment. Pip starts collecting metadata, then enters a loop trying to find versions of \`urllib3\`, \`requests\`, and \`certifi\` that satisfy both \`botocore\` \(pulled by a storage backend\) and \`google-cloud-core\`. The terminal shows increasing backtracking counts \(100, 200, 500\). Developer waits 20 minutes. They search and find that pip 20.3\+ uses a new resolver. They try \`--use-deprecated=legacy-resolver\` but it's removed. They realize they need to constrain versions. Adding \`django==4.2\` and \`djangorestframework==3.14\` makes the install complete in 10 seconds.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-22T16:50:18.991089+00:00— report_created — created