# 错误：无效命令 'bdist_wheel'

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

## 根因

构建环境中未安装 wheel 包。现代 setuptools 默认不再包含 wheel 支持，因此调用构建 wheel 分发包的命令时会失败。

## 版本兼容性

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

## 解决方案

1. **** (95% 成功率)
   ```
   Install the wheel package: pip install wheel, then retry python setup.py bdist_wheel.
   ```
2. **** (98% 成功率)
   ```
   Use python -m build (requires pip install build) which automatically installs wheel in an isolated environment.
   ```

## 无效尝试

- **** — Upgrading setuptools does not install the separate wheel package; the command remains unavailable. (90% 失败率)
- **** — setup.py install is deprecated and may still fail if wheel is needed for dependencies; it also doesn't produce a wheel. (60% 失败率)
