python
install_error
ai_generated
true
错误:无效命令 'bdist_wheel'。错误:为 foo 构建 wheel 失败。错误:无法为 foo 构建 wheel,这是安装基于 pyproject.toml 的项目所必需的。
error: invalid command 'bdist_wheel' ERROR: Failed building wheel for foo ERROR: Could not build wheels for foo, which is required to install pyproject.toml-based projects
ID: python/pip-missing-wheel-bdist-build
80%修复率
87%置信度
0证据数
2024-04-09首次发现
版本兼容性
| 版本 | 状态 | 引入 | 弃用 | 备注 |
|---|---|---|---|---|
| 3.8 | active | — | — | — |
| 3.9 | active | — | — | — |
| 3.10 | active | — | — | — |
| 3.11 | active | — | — | — |
| 3.12 | active | — | — | — |
根因分析
构建环境中未安装 'wheel' 包,因此 setuptools 缺少生成 wheel 所需的 bdist_wheel 命令。常见于 --no-build-isolation 或旧构建配置。
English
The 'wheel' package is not installed in the build environment, so setuptools lacks the bdist_wheel command needed to produce a wheel. Common with --no-build-isolation or old build configs.
解决方案
-
93% 成功率
python -m pip install --upgrade pip setuptools wheel pip install foo
-
90% 成功率
# pyproject.toml [build-system] requires = ["setuptools>=61", "wheel"] build-backend = "setuptools.build_meta"
无效尝试
常见但无效的做法:
-
60% 失败
If wheel is absent in the current env, bdist_wheel is still missing.
-
85% 失败
pip version is unrelated to the missing wheel build backend command.