# 错误：无法为 foo 构建 wheel，而这是安装基于 pyproject.toml 项目所必需的

- **ID:** `python/pip-missing-build-backend`
- **领域:** python
- **类别:** install_error
- **验证级别:** ai_generated
- **修复率:** 80%

## 根因

使用 PEP 517 构建系统的包无法生成 wheel，通常是因为缺少 C 编译器、头文件或构建依赖。

## 版本兼容性

| 版本 | 状态 | 引入 | 弃用 |
|------|------|------|------|
| 3.x | active | — | — |

## 解决方案

1. **** (90% 成功率)
   ```
   On Debian/Ubuntu: `sudo apt-get install build-essential python3-dev`. On macOS: `xcode-select --install`. Then retry `pip install foo`.
   ```
2. **** (80% 成功率)
   ```
   `pip install --only-binary=:all: foo` or fetch a manylinux wheel from PyPI/conda-forge.
   ```

## 无效尝试

- **** — Upgrading pip does not provide the missing system toolchain. (85% 失败率)
- **** — Disabling build isolation can help only if build deps are preinstalled; usually they are not. (70% 失败率)
