# ERROR: Exception:
Traceback (most recent call last):
  File "/tmp/pip-build-env-.../overlay/lib/python3.11/site-packages/setuptools/build_meta.py", line 317, in get_requires_for_build_wheel
    return self._get_build_requires(config_settings, requirements=[])
...
ModuleNotFoundError: No module named 'setuptools'

- **ID:** `python/pip-metadata-generation-failed`
- **Domain:** python
- **Category:** install_error
- **Verification:** ai_generated
- **Fix Rate:** 80%

## Root Cause

Build isolation is enabled but setuptools is not installed in the isolated build environment, often due to a broken pip or missing build backend.

## Version Compatibility

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

## Workarounds

1. **** (90% success)
   ```
   Install setuptools and wheel in the main env, then use `--no-build-isolation`: `pip install setuptools wheel && pip install --no-build-isolation foo`.
   ```
2. **** (75% success)
   ```
   Upgrade pip to latest: `python -m pip install --upgrade pip`.
   ```

## Dead Ends

- **** — Build isolation uses a separate environment; installing globally does not help. (80% fail)
- **** — May still fail if setuptools is not installed in the main environment. (50% fail)
