# 错误：命令 'gcc' 以退出状态 1 失败
    正在构建 'foo._speedups' 扩展

- **ID:** `python/setuptools-cython-build-ext-failed`
- **领域:** python
- **类别:** install_error
- **验证级别:** ai_generated
- **修复率:** 80%

## 根因

一个带 C 扩展（Cython）的包正从 sdist 构建，但编译器工具链或 Python 开发头文件缺失/不兼容，导致 gcc 在扩展构建期间失败。

## 版本兼容性

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

## 解决方案

1. **** (90% 成功率)
   ```
   Install a prebuilt wheel: pip install --only-binary=:all: foo  # avoids compilation entirely
   ```
2. **** (82% 成功率)
   ```
   Install the toolchain: sudo apt install build-essential python3-dev  # then pip install foo
   ```

## 无效尝试

- **** — Disabling isolation doesn't install gcc or python-dev headers; the compiler is still absent. (65% 失败率)
- **** — Build tooling versions don't affect the missing system compiler/headers; compilation still fails. (60% 失败率)
