{
  "id": "python/pyproject-toml-missing-build-backend",
  "signature": "ERROR: Could not build wheels for mypkg, which is required to install pyproject.toml-based projects\n\n× Getting requirements to build wheel did not run successfully.\n╰─> [1 lines of output]\n    BackendUnavailable: Cannot import 'setuptools.build_meta'",
  "signature_zh": "错误：无法为 mypkg 构建 wheel，而这是安装基于 pyproject.toml 的项目所必需的\n\n× 获取构建 wheel 所需的要求未成功运行。\n╰─> 后端不可用：无法导入 'setuptools.build_meta'",
  "regex": "ERROR:\\ Could\\ not\\ build\\ wheels\\ for\\ mypkg,\\ which\\ is\\ required\\ to\\ install\\ pyproject\\.toml\\-based\\ projects\\\n\\\n×\\ Getting\\ requirements\\ to\\ build\\ wheel\\ did\\ not\\ run\\ successfully\\.\\\n╰─>\\ \\[1\\ lines\\ of\\ output\\]\\\n\\ \\ \\ \\ BackendUnavailable:\\ Cannot\\ import\\ 'setuptools\\.build_meta'",
  "domain": "python",
  "category": "config_error",
  "subcategory": null,
  "root_cause": "The declared PEP 517 build backend cannot be imported in the isolated build env, typically because setuptools is missing or the pyproject.toml names a backend not listed in `[build-system] requires`.",
  "root_cause_type": "generic",
  "root_cause_zh": "声明的 PEP 517 构建后端无法在隔离构建环境中导入，通常因为缺少 setuptools，或 pyproject.toml 指定的后端未列入 `[build-system] requires`。",
  "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": "Unrelated to the backend import failure.",
      "fail_rate": 0.92,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "Build isolation ignores the outer env's site-packages by design.",
      "fail_rate": 0.8,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "",
      "success_rate": 0.9,
      "how": "Fix pyproject.toml so `[build-system] requires = [\"setuptools>=61\", \"wheel\"]` and `build-backend = \"setuptools.build_meta\"`, then rebuild.",
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "success_rate": 0.75,
      "how": "Bypass isolation for a quick local build: `pip install --no-build-isolation .` after installing setuptools/wheel in the current env.",
      "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.86,
  "fix_success_rate": 0.8,
  "resolvable": "true",
  "first_seen": "2024-08-30",
  "last_confirmed": "2025-01-01",
  "last_updated": "2025-01-01",
  "evidence_count": 0,
  "tags": [],
  "locale": "en",
  "aliases": []
}