# 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.
foo 1.0 requires bar<2, but you have bar 2.1 which is incompatible.

- **ID:** `python/pip-conflicting-dependencies-backtracking`
- **Domain:** python
- **Category:** install_error
- **Verification:** ai_generated
- **Fix Rate:** 80%

## Root Cause

An existing environment already contains a package version that conflicts with a newly installed package; the resolver only warns rather than fixing the pre-existing install.

## Version Compatibility

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

## Workarounds

1. **** (95% success)
   ```
   python -m venv .venv && source .venv/bin/activate
pip install pip-tools
pip-compile requirements.in
pip-sync requirements.txt
   ```
2. **** (90% success)
   ```
   pip install 'foo==1.0' 'bar<2'
pip check
   ```

## Dead Ends

- **** — Upgrades both without regard to the constraint; may re-trigger the same conflict or introduce new ones. (70% fail)
- **** — Force-reinstall does not resolve version constraints; the same incompatible pair is reinstalled. (85% fail)
