# ERROR: Cannot install package-a and package-b because these package versions have conflicting dependencies. The conflict is caused by: The user requested package-a; package-b depends on package-a<2.0

- **ID:** `python/pip-dependency-resolver-backtracking-too-deep`
- **Domain:** python
- **Category:** install_error
- **Verification:** ai_generated
- **Fix Rate:** 80%

## Root Cause

pip's new resolver performs exhaustive backtracking when transitive dependency constraints conflict. The resolver explores every possible version combination, which can take minutes or hang indefinitely on large dependency trees with circular or deeply nested constraints.

## Version Compatibility

| Version | Status | Introduced | Deprecated |
|---------|--------|------------|------------|
| 3.8 | active | — | — |
| 3.9 | active | — | — |
| 3.10 | active | — | — |
| 3.11 | active | — | — |
| 3.12 | active | — | — |

## Workarounds

1. **** (70% success)
   ```
   Use pip install --use-deprecated=legacy-resolver to fall back to the old non-backtracking resolver, which installs packages sequentially and may succeed with warnings.
   ```
2. **** (85% success)
   ```
   Manually identify a compatible version set using pip install --dry-run -v and then pin exact versions in requirements.txt, e.g., package-a==1.2.3 and package-b==2.0.1.
   ```
3. **** (90% success)
   ```
   Use pip-tools: pip-compile requirements.in to generate a fully pinned requirements.txt with compatible versions, then pip-sync.
   ```

## Dead Ends

- **** — Bypasses all dependency checks, leading to runtime ImportError or AttributeError when packages are actually missing or incompatible. (75% fail)
- **** — Latest versions often have their own new conflicts; resolver still backtracks, just with different constraints. (65% fail)
- **** — The resolver algorithm is already current; upgrading doesn't change the fundamental conflict in dependency metadata. (80% fail)
