# ImportError: cannot import name 'canonicalize_name' from 'packaging.utils'

- **ID:** `python/packaging-utils-import-error`
- **Domain:** python
- **Category:** module_error
- **Verification:** ai_generated
- **Fix Rate:** 80%

## Root Cause

The function canonicalize_name was moved to packaging.utils in newer versions, but the installed packaging library is too old.

## 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)
   ```
   pip install --upgrade packaging
   ```
2. **** (85% success)
   ```
   try: from packaging.utils import canonicalize_name; except ImportError: from packaging.utils import canonicalize_name as _; # handle manually
   ```

## Dead Ends

- **** — Downgrading may break other packages that depend on newer features. (40% fail)
- **** — The function simply does not exist in older versions; no alternative path works. (80% fail)
