python install_error ai_generated true

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

Also available as: JSON · Markdown · 中文
80%Fix Rate
89%Confidence
0Evidence
2024-02-08First Seen

Version Compatibility

VersionStatusIntroducedDeprecatedNotes
3.7 active
3.8 active
3.9 active
3.10 active

Root Cause

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

generic

中文

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

Workarounds

  1. 95% success
    Install wheel into the build environment: `pip install wheel` (or `pip install --upgrade setuptools wheel`), then retry the build.
  2. 90% success
    Use `python -m build` which manages build dependencies via pyproject.toml's `[build-system] requires`.

Dead Ends

Common approaches that don't work:

  1. 70% fail

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

  2. 75% fail

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