# ModuleNotFoundError: No module named 'pkg_resources'

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

## Root Cause

setuptools is not installed in the active environment, or the environment was created without setuptools (e.g., some venv setups or distro Python without pip). Code importing pkg_resources fails.

## Version Compatibility

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

## Workarounds

1. **** (95% success)
   ```
   Install setuptools into the active environment:
python -m pip install setuptools
   ```
2. **** (85% success)
   ```
   Migrate to importlib.metadata / importlib.resources:
from importlib.metadata import version
print(version('requests'))
   ```

## Dead Ends

- **** — There is no standalone pkg_resources package on PyPI; it ships inside setuptools. (95% fail)
- **** — Silences the error but any code depending on resource access still fails later. (70% fail)
