python install_error ai_generated true

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

usage: setup.py [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...] or: setup.py --help [cmd1 cmd2 ...] or: setup.py --help-commands or: setup.py cmd --help error: invalid command 'bdist_wheel'

ID: python/setuptools-invalid-command-bdist-wheel

其他格式: JSON · Markdown 中文 · English
80%修复率
89%置信度
0证据数
2024-02-08首次发现

版本兼容性

版本状态引入弃用备注
3.7 active
3.8 active
3.9 active
3.10 active

根因分析

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

English

The `wheel` package is not installed in the build environment, so setuptools does not register the `bdist_wheel` command used to build wheels.

generic

解决方案

  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`.

无效尝试

常见但无效的做法:

  1. 70% 失败

    Bypasses the wheel build but installs an unmanaged egg and often fails on modern pip/setuptools.

  2. 75% 失败

    Still requires bdist_wheel and does not install the missing wheel package.