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

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

## 根因

pip 尝试在隔离环境中构建 wheel，但失败，因为 pyproject.toml 中指定的构建依赖不可用或无法安装，通常是由于网络问题或缺少系统库。

## 版本兼容性

| 版本 | 状态 | 引入 | 弃用 |
|------|------|------|------|
| 3.8 | active | — | — |
| 3.9 | active | — | — |
| 3.10 | active | — | — |
| 3.11 | active | — | — |
| 3.12 | active | — | — |

## 解决方案

1. **** (85% 成功率)
   ```
   Install build dependencies manually: pip install build, then run python -m build to see detailed errors, and install missing system packages (e.g., libffi-dev, python3-dev).
   ```
2. **** (75% 成功率)
   ```
   Use a pre-built wheel if available: pip install --only-binary :all: some-package.
   ```

## 无效尝试

- **** — Requires build dependencies to be already installed in the current environment; often they are not, leading to different errors. (70% 失败率)
- **** — Does not resolve missing system libraries or network issues. (80% 失败率)
