# ERROR: pip's dependency resolver detected conflicting requirements. The requirements.txt file contains '<package>==1.0' but pip freeze shows '<package>==2.0' installed.

- **ID:** `pip/conflict-with-requirements-txt-and-pip-freeze`
- **Domain:** pip
- **Category:** config_error
- **Error Code:** `ERROR`
- **Verification:** ai_generated
- **Fix Rate:** 85%

## Root Cause

The user has a pinned version in requirements.txt that differs from the currently installed version, and pip's resolver cannot reconcile the conflict because the installed version violates the constraint.

## Version Compatibility

| Version | Status | Introduced | Deprecated |
|---------|--------|------------|------------|
| pip 22.3 | active | — | — |
| pip 23.0 | active | — | — |
| pip 23.2.1 | active | — | — |

## Workarounds

1. **Update requirements.txt to match the installed version: run `pip freeze | grep <package>` and replace the version in requirements.txt with the output. Example: `pip freeze | grep requests` then set `requests==2.31.0` in requirements.txt.** (90% success)
   ```
   Update requirements.txt to match the installed version: run `pip freeze | grep <package>` and replace the version in requirements.txt with the output. Example: `pip freeze | grep requests` then set `requests==2.31.0` in requirements.txt.
   ```
2. **Use `--ignore-installed` with pip install to bypass the check: `pip install -r requirements.txt --ignore-installed <package>`** (75% success)
   ```
   Use `--ignore-installed` with pip install to bypass the check: `pip install -r requirements.txt --ignore-installed <package>`
   ```

## Dead Ends

- **** — The upgrade may break other dependencies that rely on the newer version; pip's resolver will still complain if the upgrade is not possible due to other constraints. (70% fail)
- **** — This removes the constraint entirely, but pip may still detect the version mismatch if the package is a dependency of another package in the file. (60% fail)
