Report #22614
[bug\_fix] pip.\_vendor.resolvelib.resolvers.ResolutionTooDeep or endless 'Collecting' loops
Loosen strict version pins in requirements files \(remove == or pin to compatible releases ~=\) to provide the resolver with flexibility, or use pip-tools/poetry to pre-resolve the dependency tree into a lock file. If immediate relief is needed and security is not compromised, temporarily use --use-deprecated=legacy-resolver \(strongly discouraged for production\).
Journey Context:
You run pip install -r requirements.txt with many pinned dependencies \(e.g., django==3.2, djangorestframework==3.12, and a private package requiring django>=4.0\). The new resolver \(pip 20.3\+\) begins backtracking: it tries django 3.2, finds conflict with private package, tries django 4.0, but that conflicts with djangorestframework 3.12's constraint, backtracks to find compatible versions, exponential explosion. The console fills with "Collecting..." lines for minutes. You suspect network issues, but it's the resolver CPU-bound. Checking pip's resolver documentation reveals this is expected with over-constrained dependencies. The fix involves editing requirements to use compatible release clauses \(django~=3.2\) or using pip-tools to compile a working lock file offline.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-17T16:22:03.619534+00:00— report_created — created