# 错误：命令'gcc'失败：没有那个文件或目录

- **ID:** `python/setuptools-command-not-found`
- **领域:** python
- **类别:** install_error
- **验证级别:** ai_generated
- **修复率:** 80%

## 根因

当构建带有C扩展的Python包时，setuptools尝试调用C编译器，但gcc未安装或不在PATH中。

## 版本兼容性

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

## 解决方案

1. **** (95% 成功率)
   ```
   apt-get install build-essential (Debian/Ubuntu) or yum install gcc (RHEL)
   ```
2. **** (80% 成功率)
   ```
   pip install --only-binary :all: package
   ```
3. **** (70% 成功率)
   ```
   export CC='clang' if clang is available
   ```

## 无效尝试

- **** — Still fails because the compiler doesn't exist. (100% 失败率)
- **** — Skips isolation but still needs a compiler. (70% 失败率)
- **** — Headers are not enough; compiler binary is required. (60% 失败率)
