python
install_error
ai_generated
true
错误:无效命令 'bdist_wheel'
error: invalid command 'bdist_wheel'
ID: python/setuptools-install-command-invalid-command
80%修复率
85%置信度
0证据数
2024-04-10首次发现
版本兼容性
| 版本 | 状态 | 引入 | 弃用 | 备注 |
|---|---|---|---|---|
| 3.7 | active | — | — | — |
| 3.8 | active | — | — | — |
| 3.9 | active | — | — | — |
| 3.10 | active | — | — | — |
| 3.11 | active | — | — | — |
根因分析
构建环境中未安装 wheel 包。现代 setuptools 默认不再包含 wheel 支持,因此调用构建 wheel 分发包的命令时会失败。
English
The wheel package is not installed in the build environment. Modern setuptools no longer includes wheel support by default, so building a wheel distribution fails when the command is invoked.
解决方案
-
95% 成功率
Install the wheel package: pip install wheel, then retry python setup.py bdist_wheel.
-
98% 成功率
Use python -m build (requires pip install build) which automatically installs wheel in an isolated environment.
无效尝试
常见但无效的做法:
-
90% 失败
Upgrading setuptools does not install the separate wheel package; the command remains unavailable.
-
60% 失败
setup.py install is deprecated and may still fail if wheel is needed for dependencies; it also doesn't produce a wheel.