# ERROR: Could not build wheels for foo, which is required to install pyproject.toml-based projects
  ModuleNotFoundError: No module named 'setuptools'

- **ID:** `python/pip-build-backend-missing-setuptools-legacy`
- **Domain:** python
- **Category:** install_error
- **Verification:** ai_generated
- **Fix Rate:** 80%

## Root Cause

The isolated build environment for the package lacks setuptools. This happens when the build backend is setuptools but build isolation cannot fetch it, or when running in an environment where setuptools was uninstalled.

## Version Compatibility

| Version | Status | Introduced | Deprecated |
|---------|--------|------------|------------|
| 3.8+ | active | — | — |

## Workarounds

1. **** (90% success)
   ```
   python -m pip install --upgrade setuptools wheel
python -m pip install foo
   ```
2. **** (85% success)
   ```
   python -m pip install --upgrade setuptools wheel
python -m pip install --no-build-isolation foo
   ```

## Dead Ends

- **** — Runs the build in the current env; if setuptools isn't installed there either, same error. Also risks version skew. (70% fail)
- **** — You cannot interact with pip's ephemeral isolated build env; it is torn down automatically. (90% fail)
