# pkg_resources.VersionConflict: (importlib-metadata 4.0.0 (/usr/lib/python3/dist-packages), Requirement.parse('importlib-metadata>=4.6.4'))

- **ID:** `python/importlib-metadata-version-conflict`
- **Domain:** python
- **Category:** module_error
- **Verification:** ai_generated
- **Fix Rate:** 80%

## Root Cause

A system-managed (distro) importlib-metadata is older than what a package requires, and pkg_resources refuses to proceed because the installed version does not satisfy the requirement.

## Version Compatibility

| Version | Status | Introduced | Deprecated |
|---------|--------|------------|------------|
| 3.8 | active | — | — |
| 3.9 | active | — | — |
| 3.10 | active | — | — |

## Workarounds

1. **** (90% success)
   ```
   Use a virtualenv so pip's importlib-metadata shadows the system one: `python -m venv .venv && . .venv/bin/activate && pip install -U importlib-metadata`.
   ```
2. **** (75% success)
   ```
   Upgrade in user space: `pip install --user -U 'importlib-metadata>=4.6.4'` and ensure `~/.local/lib` precedes `/usr/lib/python3/dist-packages` on sys.path.
   ```

## Dead Ends

- **** — Leaves two copies on sys.path and the distro copy may still shadow the new one. (60% fail)
- **** — Breaks other system tools that depend on it. (70% fail)
