Report #5457
[bug\_fix] ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts. ... ResolutionTooDeep
Upgrade pip to the latest version \(\`pip install --upgrade pip\`\) to ensure the new resolver is active. If conflicts persist, generate a lock file \(e.g., using \`pip-tools\` or \`poetry\`\) or manually pin versions in \`requirements.txt\` to a compatible set, or use a constraints file \(\`-c constraints.txt\`\) to force specific versions of transitive dependencies. The root cause is that the legacy pip resolver installed packages sequentially without checking global consistency, allowing incompatible transitive dependencies \(e.g., A requires X>=2.0, B requires X<2.0\) to coexist, which the new strict resolver catches, or the resolver gets lost in a deep dependency tree.
Journey Context:
You clone a legacy project and run \`pip install -r requirements.txt\`. It spins for 30 minutes, downloading multiple versions of \`urllib3\`, \`botocore\`, and \`boto3\`, eventually crashing with \`ResolutionTooDeep\` or simply hanging. You Ctrl-C it and try adding \`--use-deprecated=legacy-resolver\`, which works instantly but warns about conflicts. You inspect the installed packages and see \`requests 2.28.0\` and \`botocore 1.29.0\`, which require incompatible \`urllib3\` versions. The 'aha' moment comes when you realize the old resolver just overwrote \`urllib3\` with whichever package installed last, masking the conflict. You upgrade pip \(\`pip install --upgrade pip\`\), delete the virtualenv, recreate it, and run \`pip install -r requirements.txt\` again. The new resolver immediately outputs a clear error: 'botocore 1.29.0 requires urllib3<1.27, but you have urllib3 2.0.0 which is incompatible'. You then use \`pip-tools\` to compile a resolved \`requirements.lock\` or manually pin \`urllib3<1.27\` in your \`requirements.txt\` to satisfy the constraint. The fix works because it replaces the naive sequential installer with a SAT-solver based resolver that validates the entire dependency graph upfront, and pinning removes the ambiguity causing the backtracking.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-15T21:18:58.782375+00:00— report_created — created