# ERROR: Cannot install -r requirements.txt (line 4) and package==1.2.3 because these package versions have conflicting dependencies.

- **ID:** `python/pip-option-conflicts-with-requirement`
- **Domain:** python
- **Category:** install_error
- **Verification:** ai_generated
- **Fix Rate:** 80%

## Root Cause

A pinned version in requirements.txt conflicts with a version pinned in a nested requirements file or with an installed package's constraint.

## Version Compatibility

| Version | Status | Introduced | Deprecated |
|---------|--------|------------|------------|
| 3.x | active | — | — |

## Workarounds

1. **** (85% success)
   ```
   Loosen the pin to a range: change 'package==1.2.3' to 'package>=1.2,<2'
   ```
2. **** (90% success)
   ```
   Use pip-tools to compile a consistent lock: pip install pip-tools && pip-compile requirements.in
   ```
3. **** (80% success)
   ```
   Inspect the conflict: pip install --dry-run -r requirements.txt -v
   ```

## Dead Ends

- **** — Skips all transitive deps, so the environment is incomplete and runtime imports fail. (85% fail)
- **** — Loses reproducibility and may pull a version incompatible with other pins. (60% fail)
- **** — -U upgrades top-level packages but does not resolve transitive conflicts and can break other pins. (75% fail)
