pip
resolver_error
ai_generated
true
INFO: pip is looking at multiple versions of <package> to determine which version is compatible with other requirements. This could take a while.
ID: pip/backtracking-long
82%Fix Rate
85%Confidence
50Evidence
2022-06-01First Seen
Version Compatibility
| Version | Status | Introduced | Deprecated | Notes |
|---|---|---|---|---|
| 24 | active | — | — | — |
Root Cause
Pip's dependency resolver is backtracking through many version combinations to find a compatible set. Can take hours or appear to hang. Usually caused by loose version constraints, packages with many releases, or genuinely conflicting requirements.
genericWorkarounds
-
88% success Pin specific versions to reduce the search space: package==X.Y.Z
Add explicit version pins for the packages pip is backtracking on, based on known-good combinations
-
85% success Use pip-compile (pip-tools) to pre-resolve dependencies offline
pip install pip-tools && pip-compile requirements.in -o requirements.txt && pip install -r requirements.txt
-
83% success Use constraints file to limit version search space
Create constraints.txt with known-good versions, then: pip install -c constraints.txt -r requirements.txt
Dead Ends
Common approaches that don't work:
-
Wait indefinitely for the resolver to finish
60% fail
Backtracking can be combinatorial; some dependency sets never resolve and pip will run for hours or days
-
Use --use-deprecated=legacy-resolver
70% fail
Legacy resolver was removed in pip 24; even when available it silently installs incompatible versions
Error Chain
Leads to:
Preceded by:
Frequently confused with: