{
  "id": "python/pip-missing-wheel-bdist-build",
  "signature": "error: invalid command 'bdist_wheel'\nERROR: Failed building wheel for foo\nERROR: Could not build wheels for foo, which is required to install pyproject.toml-based projects",
  "signature_zh": "错误：无效命令 'bdist_wheel'。错误：为 foo 构建 wheel 失败。错误：无法为 foo 构建 wheel，这是安装基于 pyproject.toml 的项目所必需的。",
  "regex": "error:\\ invalid\\ command\\ 'bdist_wheel'\\\nERROR:\\ Failed\\ building\\ wheel\\ for\\ foo\\\nERROR:\\ Could\\ not\\ build\\ wheels\\ for\\ foo,\\ which\\ is\\ required\\ to\\ install\\ pyproject\\.toml\\-based\\ projects",
  "domain": "python",
  "category": "install_error",
  "subcategory": null,
  "root_cause": "The 'wheel' package is not installed in the build environment, so setuptools lacks the bdist_wheel command needed to produce a wheel. Common with --no-build-isolation or old build configs.",
  "root_cause_type": "generic",
  "root_cause_zh": "构建环境中未安装 'wheel' 包，因此 setuptools 缺少生成 wheel 所需的 bdist_wheel 命令。常见于 --no-build-isolation 或旧构建配置。",
  "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": "If wheel is absent in the current env, bdist_wheel is still missing.",
      "fail_rate": 0.6,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "pip version is unrelated to the missing wheel build backend command.",
      "fail_rate": 0.85,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "",
      "success_rate": 0.93,
      "how": "python -m pip install --upgrade pip setuptools wheel\npip install foo",
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "success_rate": 0.9,
      "how": "# pyproject.toml\n[build-system]\nrequires = [\"setuptools>=61\", \"wheel\"]\nbuild-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.87,
  "fix_success_rate": 0.8,
  "resolvable": "true",
  "first_seen": "2024-04-09",
  "last_confirmed": "2025-01-01",
  "last_updated": "2025-01-01",
  "evidence_count": 0,
  "tags": [],
  "locale": "en",
  "aliases": []
}