{
  "id": "pip/pep-517-backend-not-found",
  "signature": "ERROR: Could not find a backend for building the project. The project uses a build backend that is not installed.",
  "signature_zh": "错误：找不到用于构建项目的后端。该项目使用的构建后端未安装。",
  "regex": "ERROR: Could not find a backend for building the project\\. The project uses a build backend that is not installed\\.",
  "domain": "pip",
  "category": "build_error",
  "subcategory": null,
  "root_cause": "The pyproject.toml specifies a build backend (e.g., flit_core, poetry-core, mesonpy) that is not available in the build environment, often because it's not listed as a build-system.requires dependency.",
  "root_cause_type": "generic",
  "root_cause_zh": "pyproject.toml 指定了一个构建后端（例如 flit_core、poetry-core、mesonpy），但在构建环境中不可用，通常是因为它没有被列为 build-system.requires 依赖。",
  "versions": [
    {
      "version": "pip 21.3+",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "Python 3.9-3.12",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    }
  ],
  "os_specific": {},
  "dead_ends": [
    {
      "action": "",
      "why_fails": "Pip's build isolation ignores the global environment; the backend must be declared in pyproject.toml's build-system.requires.",
      "fail_rate": 0.85,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "Modern packages may not include setup.py; removing pyproject.toml can break the build entirely.",
      "fail_rate": 0.7,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "This can cause version conflicts or missing dependencies, and is discouraged by pip maintainers.",
      "fail_rate": 0.6,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "Add the missing backend to pyproject.toml under [build-system] requires:\n[build-system]\nrequires = [\"flit_core>=3.2\"]\nbuild-backend = \"flit_core.buildapi\"\nThen re-run pip install.",
      "success_rate": 0.9,
      "how": "Add the missing backend to pyproject.toml under [build-system] requires:\n[build-system]\nrequires = [\"flit_core>=3.2\"]\nbuild-backend = \"flit_core.buildapi\"\nThen re-run pip install.",
      "condition": "",
      "sources": []
    },
    {
      "action": "Install the package without build isolation: pip install --no-build-isolation <package>. Ensure the backend is pre-installed in the environment.",
      "success_rate": 0.75,
      "how": "Install the package without build isolation: pip install --no-build-isolation <package>. Ensure the backend is pre-installed in the environment.",
      "condition": "",
      "sources": []
    },
    {
      "action": "Upgrade pip to the latest version: python -m pip install --upgrade pip, which may improve backend detection.",
      "success_rate": 0.7,
      "how": "Upgrade pip to the latest version: python -m pip install --upgrade pip, which may improve backend detection.",
      "condition": "",
      "sources": []
    }
  ],
  "workarounds_zh": [
    "Add the missing backend to pyproject.toml under [build-system] requires:\n[build-system]\nrequires = [\"flit_core>=3.2\"]\nbuild-backend = \"flit_core.buildapi\"\nThen re-run pip install.",
    "Install the package without build isolation: pip install --no-build-isolation <package>. Ensure the backend is pre-installed in the environment.",
    "Upgrade pip to the latest version: python -m pip install --upgrade pip, which may improve backend detection."
  ],
  "transition_graph": {
    "leads_to": [],
    "preceded_by": [],
    "frequently_confused_with": []
  },
  "official_doc_url": "https://pip.pypa.io/en/stable/topics/build-system/",
  "official_doc_section": null,
  "error_code": null,
  "verification_tier": "ai_generated",
  "confidence": 0.87,
  "fix_success_rate": 0.82,
  "resolvable": "true",
  "first_seen": "2023-04-12",
  "last_confirmed": "2024-06-01",
  "last_updated": "2024-06-01",
  "evidence_count": 1,
  "tags": [],
  "locale": "en",
  "aliases": []
}