# ModuleNotFoundError: No module named 'setuptools' during pip install -e . (pyproject.toml build backend)

- **ID:** `python/pip-build-isolation-missing-setuptools`
- **Domain:** python
- **Category:** module_error
- **Verification:** ai_generated
- **Fix Rate:** 80%

## Root Cause

A pyproject.toml declares setuptools.build_meta as the backend, but the build isolation environment or the project's build-system.requires does not include setuptools.

## Version Compatibility

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

## Workarounds

1. **** (95% success)
   ```
   Declare the build requirement in pyproject.toml:
[build-system]
requires = ["setuptools>=61", "wheel"]
build-backend = "setuptools.build_meta"
   ```
2. **** (90% success)
   ```
   Install build deps explicitly then build:
pip install setuptools wheel build
python -m build
   ```

## Dead Ends

- **** — Uses the current env, which may also lack setuptools or have an incompatible version; masks the real config bug. (65% fail)
- **** — Installs in the outer env but build isolation still creates a fresh env without it. (75% fail)
