{
  "id": "python/metadata-generation-failed-setuptools",
  "signature": "error: metadata-generation-failed\n\n× Encountered error while generating package metadata.\n╰─> See above for output.",
  "signature_zh": "错误：元数据生成失败\n\n× 生成包元数据时遇到错误。\n╰─> 参见上面的输出。",
  "regex": "error:\\ metadata\\-generation\\-failed\\\n\\\n×\\ Encountered\\ error\\ while\\ generating\\ package\\ metadata\\.\\\n╰─>\\ See\\ above\\ for\\ output\\.",
  "domain": "python",
  "category": "install_error",
  "subcategory": null,
  "root_cause": "pip's PEP 517 isolated build could not generate metadata because the package's setup.py/build backend raised an exception (commonly a missing dependency, a syntax error in setup.py, or an unimportable package).",
  "root_cause_type": "generic",
  "root_cause_zh": "pip 的 PEP 517 隔离构建无法生成元数据，因为包的 setup.py/构建后端抛出了异常（常见原因：缺少依赖、setup.py 语法错误或包无法导入）。",
  "versions": [
    {
      "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": "The failure happens during metadata generation, not from a corrupted cache.",
      "fail_rate": 0.9,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "The same source distribution is fetched and fails identically.",
      "fail_rate": 0.7,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "",
      "success_rate": 0.85,
      "how": "Re-run with verbose output to see the real exception: `pip install -v <pkg>`. The actual error (e.g. `ModuleNotFoundError` inside setup.py) appears a few lines above.",
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "success_rate": 0.7,
      "how": "Install the build backend's runtime deps manually, or use legacy build: `pip install --no-build-isolation <pkg>` after `pip install setuptools wheel`.",
      "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-05-02",
  "last_confirmed": "2025-01-01",
  "last_updated": "2025-01-01",
  "evidence_count": 0,
  "tags": [],
  "locale": "en",
  "aliases": []
}