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

- **ID:** `python/pip-install-error-could-not-build-wheels`
- **领域:** python
- **类别:** install_error
- **验证级别:** ai_generated
- **修复率:** 80%

## 根因

该包使用 pyproject.toml 构建系统，pip 无法构建 wheel，通常是由于缺少构建依赖或编译错误。

## 版本兼容性

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

## 解决方案

1. **** (85% 成功率)
   ```
   sudo apt-get install build-essential python3-dev
   ```
2. **** (80% 成功率)
   ```
   pip install --upgrade pip setuptools wheel
   ```
3. **** (70% 成功率)
   ```
   pip install package --only-binary :all:
   ```

## 无效尝试

- **** — This can help but often fails if build dependencies are not already installed. (60% 失败率)
- **** — The underlying build issue persists on retry. (90% 失败率)
- **** — Permissions are not the root cause; the build still fails. (95% 失败率)
