{
  "id": "python/pip-build-backend-missing",
  "signature": "ERROR: Could not build wheels for somepkg, which is required to install pyproject.toml-based projects\n\n  × Getting requirements to build wheel did not run successfully.\n  │ exit code: 1\n  ╰─> ModuleNotFoundError: No module named 'flit_core'",
  "signature_zh": "错误：无法为 somepkg 构建 wheel，这是安装基于 pyproject.toml 的项目所必需的\n\n  × 获取构建 wheel 的要求未能成功运行。\n  │ 退出码：1\n  ╰─> ModuleNotFoundError：没有名为 'flit_core' 的模块",
  "regex": "ERROR:\\ Could\\ not\\ build\\ wheels\\ for\\ somepkg,\\ which\\ is\\ required\\ to\\ install\\ pyproject\\.toml\\-based\\ projects\\\n\\\n\\ \\ ×\\ Getting\\ requirements\\ to\\ build\\ wheel\\ did\\ not\\ run\\ successfully\\.\\\n\\ \\ │\\ exit\\ code:\\ 1\\\n\\ \\ ╰─>\\ ModuleNotFoundError:\\ No\\ module\\ named\\ 'flit_core'",
  "domain": "python",
  "category": "install_error",
  "subcategory": null,
  "root_cause": "The project's pyproject.toml declares a PEP 517 build backend (flit_core, hatchling, poetry-core) that is not installed and cannot be fetched due to offline mode or a missing index.",
  "root_cause_type": "generic",
  "root_cause_zh": "项目的 pyproject.toml 声明了一个 PEP 517 构建后端（flit_core、hatchling、poetry-core），但该后端未安装，且由于离线模式或缺少索引而无法获取。",
  "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": "Disables isolation but flit_core still isn't in the current environment, so the same ModuleNotFoundError occurs.",
      "fail_rate": 0.85,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "The missing module is the declared backend (flit_core), not setuptools/wheel.",
      "fail_rate": 0.9,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "",
      "success_rate": 0.95,
      "how": "# Inspect the backend\npython - <<'PY'\nimport tomllib, pathlib\nprint(tomllib.loads(pathlib.Path('pyproject.toml').read_text())['build-system'])\nPY\n# Then install it\npip install flit_core\npip install .",
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "success_rate": 0.9,
      "how": "unset PIP_NO_BUILD_ISOLATION\nunset PIP_NO_INDEX\npip install --index-url https://pypi.org/simple .",
      "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": "2025-02-17",
  "last_confirmed": "2025-01-01",
  "last_updated": "2025-01-01",
  "evidence_count": 0,
  "tags": [],
  "locale": "en",
  "aliases": []
}