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

  × Getting requirements to build wheel did not run successfully.
  │ exit code: 1
  ╰─> ModuleNotFoundError: No module named 'flit_core'

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

## Root Cause

The project's pyproject.toml declares a PEP 517 build backend (flit_core, hatchling, poetry-core) that is not installed and cannot be fetched due to offline mode or a missing index.

## Version Compatibility

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

## Workarounds

1. **** (95% success)
   ```
   # Inspect the backend
python - <<'PY'
import tomllib, pathlib
print(tomllib.loads(pathlib.Path('pyproject.toml').read_text())['build-system'])
PY
# Then install it
pip install flit_core
pip install .
   ```
2. **** (90% success)
   ```
   unset PIP_NO_BUILD_ISOLATION
unset PIP_NO_INDEX
pip install --index-url https://pypi.org/simple .
   ```

## Dead Ends

- **** — Disables isolation but flit_core still isn't in the current environment, so the same ModuleNotFoundError occurs. (85% fail)
- **** — The missing module is the declared backend (flit_core), not setuptools/wheel. (90% fail)
