# 错误：为 package_name 构建 wheel 失败

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

## 根因

缺少具有本地扩展的包的构建依赖项（如编译器、头文件）。

## 版本兼容性

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

## 解决方案

1. **Install system build tools** (90% 成功率)
   ```
   apt-get install build-essential (Linux) or xcode-select --install (macOS)
   ```
2. **Use a pre-built wheel if available** (60% 成功率)
   ```
   pip install package_name --only-binary :all:
   ```

## 无效尝试

- **Installing the package with --no-cache-dir** — Cache is not the issue; missing dependencies remain. (40% 失败率)
- **Upgrading pip to latest** — Pip version doesn't provide system build tools. (30% 失败率)
