# ERROR: Cannot install Foo-Bar==1.0 and foo_bar==1.1 because these package versions have conflicting dependencies.

- **ID:** `python/pip-normalize-name-case-mismatch`
- **Domain:** python
- **Category:** config_error
- **Verification:** ai_generated
- **Fix Rate:** 80%

## Root Cause

Two requirement lines specify the same distribution using different name spellings; PEP 503 normalization treats them as equal, so pinning two versions conflicts.

## 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 - <<'PY'
from packaging.utils import canonicalize_name
seen = {}
for line in open('requirements.txt'):
    line = line.strip()
    if not line or line.startswith('#'):
        continue
    name = line.split('==')[0]
    canon = canonicalize_name(name)
    if canon in seen:
        print('duplicate:', line, 'vs', seen[canon])
    else:
        seen[canon] = line
PY
   ```
2. **** (98% success)
   ```
   # requirements.txt
foo-bar==1.1
# remove the duplicate foo_bar==1.0 line
pip install -r requirements.txt
   ```

## Dead Ends

- **** — Skips dependency resolution but the two conflicting top-level pins still cannot coexist. (90% fail)
- **** — Force-reinstall does not reconcile versions; the resolver still reports the conflict. (85% fail)
