# ModuleNotFoundError: No module named 'pkg_resources'

- **ID:** `python/setuptools-pkg-resources-not-found`
- **Domain:** python
- **Category:** module_error
- **Verification:** ai_generated
- **Fix Rate:** 80%

## Root Cause

pkg_resources is part of setuptools, but the installed setuptools version is too old or missing.

## Version Compatibility

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

## Workarounds

1. **Upgrade or reinstall setuptools** (95% success)
   ```
   pip install --upgrade setuptools
   ```
2. **Install setuptools in the environment** (90% success)
   ```
   python -m pip install setuptools
   ```

## Dead Ends

- **Installing pkg_resources separately from PyPI** — pkg_resources is not a standalone package; it comes with setuptools. (90% fail)
- **Using importlib.resources instead** — This is a different API and may not be compatible with existing code. (70% fail)
