python
install_error
ai_generated
true
错误:无效命令 'bdist_wheel'
error: invalid command 'bdist_wheel'
ID: python/pip-setup-py-bdist-wheel-no-command
80%修复率
88%置信度
0证据数
2024-04-19首次发现
版本兼容性
| 版本 | 状态 | 引入 | 弃用 | 备注 |
|---|---|---|---|---|
| 3.8 | active | — | — | — |
| 3.9 | active | — | — | — |
| 3.10 | active | — | — | — |
| 3.11 | active | — | — | — |
| 3.12 | active | — | — | — |
根因分析
构建环境中缺少 wheel 包,因此 setuptools 在构建 wheel 时无法注册 bdist_wheel 命令。
English
The wheel package is missing from the build environment, so setuptools cannot register the bdist_wheel command when building a wheel.
解决方案
-
95% 成功率
pip install --upgrade wheel setuptools python setup.py bdist_wheel
-
95% 成功率
pip install build python -m build # produces dist/*.whl and dist/*.tar.gz
无效尝试
常见但无效的做法:
-
85% 失败
wheel is a separate distribution; upgrading setuptools alone does not provide bdist_wheel.
-
70% 失败
Installs in legacy mode without producing a wheel; also deprecated and may fail on 3.12.