# ERROR: Cannot install my-pkg and my_pkg because they depend on different versions of the same package, but they are the same project (normalized name: my-pkg).

- **ID:** `python/pip-name-normalization-conflict`
- **Domain:** python
- **Category:** config_error
- **Verification:** ai_generated
- **Fix Rate:** 80%

## Root Cause

Two requirement entries use different spellings of the same project name (hyphen vs underscore, case), which pip normalizes to one name and then sees as a self-conflict.

## Version Compatibility

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

## Workarounds

1. **** (95% success)
   ```
   # Replace underscores with hyphens and lowercase everything
sed -i 's/my_pkg/my-pkg/g' requirements.txt
python -m pip install -r requirements.txt
   ```
2. **** (92% success)
   ```
   python - <<'PY'
from packaging.utils import canonicalize_name
for n in ['my_pkg', 'My-Pkg', 'my.pkg']:
    print(n, '->', canonicalize_name(n))
PY
   ```

## Dead Ends

- **** — Installs the same project twice, with one overwriting the other's files. (85% fail)
- **** — If both names appear in requirements, the conflict recurs on the next install. (80% fail)
