{
  "id": "python/setuptools-command-not-found-in-setup-py",
  "signature": "error: invalid command 'bdist_wheel'\n\nERROR: Failed building wheel for foo",
  "signature_zh": "错误：无效命令 'bdist_wheel'\n\n错误：为 foo 构建 wheel 失败",
  "regex": "error:\\ invalid\\ command\\ 'bdist_wheel'\\\n\\\nERROR:\\ Failed\\ building\\ wheel\\ for\\ foo",
  "domain": "python",
  "category": "install_error",
  "subcategory": null,
  "root_cause": "The `wheel` package is not installed in the build environment, so setuptools does not know the bdist_wheel command.",
  "root_cause_type": "generic",
  "root_cause_zh": "构建环境中未安装 `wheel` 包，因此 setuptools 不知道 bdist_wheel 命令。",
  "versions": [
    {
      "version": "3.8",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "3.9",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "3.10",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "3.11",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "3.12",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    }
  ],
  "os_specific": {},
  "dead_ends": [
    {
      "action": "",
      "why_fails": "setuptools alone does not provide bdist_wheel; the wheel package is a separate distribution.",
      "fail_rate": 0.85,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "Forces source build, which still needs wheel to produce a wheel; same error.",
      "fail_rate": 0.8,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "",
      "success_rate": 0.95,
      "how": "Install wheel into the build environment:\n  pip install --upgrade setuptools wheel\n  pip install foo\nIf using build isolation, ensure your pyproject.toml [build-system] requires includes 'wheel'.",
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "success_rate": 0.9,
      "how": "For legacy setup.py projects, add to pyproject.toml:\n  [build-system]\n  requires = [\"setuptools>=61\", \"wheel\"]\n  build-backend = \"setuptools.build_meta\"",
      "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.9,
  "fix_success_rate": 0.8,
  "resolvable": "true",
  "first_seen": "2024-03-12",
  "last_confirmed": "2025-01-01",
  "last_updated": "2025-01-01",
  "evidence_count": 0,
  "tags": [],
  "locale": "en",
  "aliases": []
}