{
  "id": "python/setup-py-invalid-command-bdist-wheel",
  "signature": "error: invalid command 'bdist_wheel'",
  "signature_zh": "错误：无效命令 'bdist_wheel'",
  "regex": "error:\\ invalid\\ command\\ 'bdist_wheel'",
  "domain": "python",
  "category": "install_error",
  "subcategory": null,
  "root_cause": "Building a wheel with `python setup.py bdist_wheel` or `pip install` from sdist requires the `wheel` package. It is missing from the build environment, so setuptools does not register the bdist_wheel command.",
  "root_cause_type": "generic",
  "root_cause_zh": "使用 `python setup.py bdist_wheel` 或从 sdist 执行 `pip install` 构建 wheel 时需要 `wheel` 包。构建环境中缺少它，setuptools 未注册 bdist_wheel 命令。",
  "versions": [
    {
      "version": "3.x",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    }
  ],
  "os_specific": {},
  "dead_ends": [
    {
      "action": "",
      "why_fails": "Bypasses wheel building but is deprecated, pollutes the environment, and is not reproducible. Many modern packages refuse setup.py install.",
      "fail_rate": 0.8,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "Version mismatches and missing entry points cause later failures; setuptools may still not discover the command.",
      "fail_rate": 0.85,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "",
      "success_rate": 0.95,
      "how": "python -m pip install --upgrade wheel setuptools\npython setup.py bdist_wheel\n# or build via pip which handles build deps:\npython -m pip wheel . -w dist",
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "success_rate": 0.9,
      "how": "# pyproject.toml\n[build-system]\nrequires = [\"setuptools>=68\", \"wheel\"]\nbuild-backend = \"setuptools.build_meta\"\n# then\npython -m build",
      "condition": "",
      "sources": []
    }
  ],
  "workarounds_zh": [],
  "transition_graph": {
    "leads_to": [],
    "preceded_by": [],
    "frequently_confused_with": []
  },
  "official_doc_url": null,
  "official_doc_section": null,
  "error_code": null,
  "verification_tier": "ai_generated",
  "confidence": 0.88,
  "fix_success_rate": 0.8,
  "resolvable": "true",
  "first_seen": "2024-05-11",
  "last_confirmed": "2025-01-01",
  "last_updated": "2025-01-01",
  "evidence_count": 0,
  "tags": [],
  "locale": "en",
  "aliases": []
}