Report #16545
[bug\_fix] pip dependency resolver conflict \(ResolutionImpossible\)
The root cause is that the new pip resolver \(default since pip 20.3\) is strict and cannot find a set of package versions that satisfies all constraints in the dependency graph. This often happens when a \`requirements.txt\` pins an old version of a library \(e.g., \`requests==2.25.1\`\) that depends on \`urllib3<1.27\`, but another dependency \(e.g., \`botocore\`\) requires \`urllib3>=1.26.4\`. The fix is not to use \`--use-deprecated=legacy-resolver\` \(which is removed in pip 21.0\+\), but to manually inspect the conflict output, identify the 'parent' packages causing the version collision, and relax or tighten the constraints in your \`requirements.in\` \(for pip-tools\) or \`pyproject.toml\`. Use \`pip install package --dry-run\` \(pip 22.0\+\) or \`pipdeptree\` to visualize the tree. If the conflict is in a transient dependency, upgrade the top-level package to a version that supports the required transient version, or pin the transient dependency explicitly if compatible.
Journey Context:
You add \`django==4.2\` to your \`requirements.txt\` and run \`pip install -r requirements.txt\`. The installation proceeds for a moment, then pip spits out a massive red error: \`ResolutionImpossible: for package: django, version: 4.2\`. The error message lists \`asgiref\` and \`sqlparse\` with incomprehensible version ranges. You stare at your \`requirements.txt\` and see \`asgiref==3.3.0\` pinned there from a year ago. You realize that Django 4.2 requires \`asgiref>=3.6.0\`, but your pin forces 3.3.0. You try \`pip install django==4.2 --use-deprecated=legacy-resolver\` and it 'works,' but you read that this was removed in pip 21.0 and causes runtime bugs. You go down the rabbit hole of \`pipdeptree\`, discovering that \`celery\` also depends on an older \`asgiref\` via \` kombu\`. The 'aha' moment is realizing that \`requirements.txt\` is a flat list, not a resolver; you need to upgrade \`celery\` to a newer version that supports \`asgiref>=3.6.0\`, or manually pin \`asgiref>=3.6.0\` and hope celery works \(it might not\). You migrate to \`pip-tools\` to generate a real resolved lock file.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-17T02:54:11.917655+00:00— report_created — created