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

- **ID:** `python/pip-wheel-not-supported-python-version`
- **领域:** python
- **类别:** install_error
- **验证级别:** ai_generated
- **修复率:** 80%

## 根因

当前（Python 版本、平台、ABI）组合没有预构建 wheel，pip 回退到源码构建，而构建依赖（编译器、头文件）缺失导致失败。

## 版本兼容性

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

## 解决方案

1. **** (88% 成功率)
   ```
   Install a prebuilt wheel from a compatible index or pin to a version with wheels: `pip install 'numpy<2' --only-binary=:all:` to force wheel-only resolution.
   ```
2. **** (85% 成功率)
   ```
   Install build prerequisites: on Debian/Ubuntu `apt-get install build-essential python3-dev`, then retry `pip install numpy`.
   ```

## 无效尝试

- **** — Upgrading build tools does not create a wheel that upstream did not publish for this platform. (75% 失败率)
- **** — Uses the current environment's build deps; usually the same missing compiler is the actual blocker. (70% 失败率)
