python install_error ai_generated true

error: invalid command 'bdist_wheel'

ID: python/pip-legacy-setup-py-bdist-wheel-failed

Also available as: JSON · Markdown · 中文
80%Fix Rate
87%Confidence
0Evidence
2024-01-22First Seen

Version Compatibility

VersionStatusIntroducedDeprecatedNotes
3.x active

Root Cause

The build backend (setuptools) is missing the `wheel` package, which provides the bdist_wheel command used when building legacy setup.py projects under PEP 517.

generic

中文

构建后端(setuptools)缺少 `wheel` 包,该包提供了在 PEP 517 下构建旧式 setup.py 项目时使用的 bdist_wheel 命令。

Workarounds

  1. 97% success
    python -m pip install --upgrade pip setuptools wheel
  2. 90% success
    python -m pip install wheel
    python -m pip install --no-build-isolation .

Dead Ends

Common approaches that don't work:

  1. 70% fail

    Upgrading setuptools does not install wheel; bdist_wheel is still missing.

  2. 60% fail

    Disabling build isolation uses the current env, which also lacks wheel, so the same error occurs.

  3. 90% fail

    bdist_wheel is invoked by pip's build backend, not by setup.py directly; edits don't help.