# ERROR: Cannot install package-a 1.0 and package-b 2.0 because these package versions have conflicting dependencies. The conflict is caused by: package-a 1.0 depends on package-c>=3.0; python_version < '3.9' and package-b 2.0 depends on package-c<3.0; python_version >= '3.9'

- **ID:** `pip/dependency-conflict-with-marker`
- **Domain:** pip
- **Category:** install_error
- **Error Code:** `ERROR`
- **Verification:** ai_generated
- **Fix Rate:** 80%

## Root Cause

Pip's resolver detects a dependency conflict between two packages due to environment markers (e.g., python_version) that create mutually exclusive version requirements for a shared dependency, making resolution impossible for the current Python version.

## Version Compatibility

| Version | Status | Introduced | Deprecated |
|---------|--------|------------|------------|
| pip 23.3 | active | — | — |
| pip 24.0 | active | — | — |
| pip 24.1 | active | — | — |

## Workarounds

1. **Install a version of package-a or package-b that does not trigger the marker conflict: pip install 'package-a<1.0' 'package-b==2.0' (adjust versions based on resolver output).** (85% success)
   ```
   Install a version of package-a or package-b that does not trigger the marker conflict: pip install 'package-a<1.0' 'package-b==2.0' (adjust versions based on resolver output).
   ```
2. **Use a different Python version that satisfies one of the marker conditions: pyenv install 3.8 && pyenv local 3.8 && pip install package-a package-b** (80% success)
   ```
   Use a different Python version that satisfies one of the marker conditions: pyenv install 3.8 && pyenv local 3.8 && pip install package-a package-b
   ```
3. **Pin package-c to a version that satisfies both markers (if possible): pip install 'package-c>=3.0,<3.0' (note: this may not exist; otherwise use a range that works for both).** (70% success)
   ```
   Pin package-c to a version that satisfies both markers (if possible): pip install 'package-c>=3.0,<3.0' (note: this may not exist; otherwise use a range that works for both).
   ```

## Dead Ends

- **** — Using pip install --upgrade --force-reinstall does not resolve the logical conflict; it only reinstalls packages without changing version constraints. (95% fail)
- **** — Setting PIP_REQUIRE_VIRTUALENV has no effect on dependency resolution logic. (98% fail)
- **** — Running pip install --no-deps package-a package-b installs both without dependencies but leaves them broken at runtime due to missing or wrong versions of package-c. (85% fail)
