# 错误：package 的某些构建依赖缺失：构建该包需要 'cython'，但未安装。

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

## 根因

项目的 build-system.requires 列出了 pip 无法获取的构建依赖，或在使用 --no-build-isolation 时未安装的依赖。

## 版本兼容性

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

## 解决方案

1. **** (88% 成功率)
   ```
   Install build deps in the host and disable isolation: pip install cython && pip install --no-build-isolation .
   ```
2. **** (92% 成功率)
   ```
   Ensure build-system.requires is correct: [build-system]\nrequires = ["setuptools>=61", "cython>=3.0"]\nbuild-backend = "setuptools.build_meta"
   ```
3. **** (85% 成功率)
   ```
   Check network access to fetch build deps: pip download cython -d /tmp/cython-test
   ```

## 无效尝试

- **** — Installing in the host env does not help when build isolation is enabled; the isolated env still lacks it. (80% 失败率)
- **** — The build actually needs Cython; removing it causes a different error (missing .c files). (85% 失败率)
- **** — --no-deps affects runtime deps, not build-time deps. (90% 失败率)
