# 用法：setup.py [全局选项] 命令1 [命令1选项] ...
错误：无效命令 'bdist_wheel'

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

## 根因

构建环境中未安装 `wheel` 包，因此 setuptools 未注册用于构建 wheel 的 `bdist_wheel` 命令。

## 版本兼容性

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

## 解决方案

1. **** (95% 成功率)
   ```
   Install wheel into the build environment: `pip install wheel` (or `pip install --upgrade setuptools wheel`), then retry the build.
   ```
2. **** (90% 成功率)
   ```
   Use `python -m build` which manages build dependencies via pyproject.toml's `[build-system] requires`.
   ```

## 无效尝试

- **** — Bypasses the wheel build but installs an unmanaged egg and often fails on modern pip/setuptools. (70% 失败率)
- **** — Still requires bdist_wheel and does not install the missing wheel package. (75% 失败率)
