# ERROR: Could not build wheels for mypkg, which is required to install pyproject.toml-based projects

× Getting requirements to build wheel did not run successfully.
╰─> [1 lines of output]
    BackendUnavailable: Cannot import 'setuptools.build_meta'

- **ID:** `python/pyproject-toml-missing-build-backend`
- **Domain:** python
- **Category:** config_error
- **Verification:** ai_generated
- **Fix Rate:** 80%

## Root Cause

The declared PEP 517 build backend cannot be imported in the isolated build env, typically because setuptools is missing or the pyproject.toml names a backend not listed in `[build-system] requires`.

## Version Compatibility

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

## Workarounds

1. **** (90% success)
   ```
   Fix pyproject.toml so `[build-system] requires = ["setuptools>=61", "wheel"]` and `build-backend = "setuptools.build_meta"`, then rebuild.
   ```
2. **** (75% success)
   ```
   Bypass isolation for a quick local build: `pip install --no-build-isolation .` after installing setuptools/wheel in the current env.
   ```

## Dead Ends

- **** — Unrelated to the backend import failure. (92% fail)
- **** — Build isolation ignores the outer env's site-packages by design. (80% fail)
