# ERROR: Cannot install package-a[extra1] and package-b[extra2] because these package versions have conflicting dependencies on common-dep (package-a[extra1] requires common-dep>=2.0, package-b[extra2] requires common-dep<2.0).

- **ID:** `pip/dependency-conflicts-with-extras`
- **Domain:** pip
- **Category:** resolver_error
- **Error Code:** `ERROR`
- **Verification:** ai_generated
- **Fix Rate:** 78%

## Root Cause

Two packages with extras specified have incompatible version constraints on a shared dependency, and pip's resolver cannot find a version of common-dep that satisfies both simultaneously.

## Version Compatibility

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

## Workarounds

1. **Install the packages without extras that cause the conflict: pip install package-a package-b** (70% success)
   ```
   Install the packages without extras that cause the conflict: pip install package-a package-b
   ```
2. **Use a virtual environment with different Python versions or package versions: python3.10 -m venv venv && source venv/bin/activate && pip install package-a[extra1] && pip install package-b[extra2]** (60% success)
   ```
   Use a virtual environment with different Python versions or package versions: python3.10 -m venv venv && source venv/bin/activate && pip install package-a[extra1] && pip install package-b[extra2]
   ```
3. **Check if one of the extras is unnecessary; if so, omit it. For example, if extra2 is optional, install package-b without it: pip install package-a[extra1] package-b** (80% success)
   ```
   Check if one of the extras is unnecessary; if so, omit it. For example, if extra2 is optional, install package-b without it: pip install package-a[extra1] package-b
   ```

## Dead Ends

- **** — Without dependencies, the packages may fail to import or function correctly. (90% fail)
- **** — If the constraints are exclusive (e.g., >=2.0 and <2.0), no single version exists, so pinning fails. (50% fail)
