{
  "id": "python/setuptools-unsupported-format",
  "signature": "error: Setup script exited with error: Unsupported format: 2",
  "signature_zh": "错误：安装脚本退出，错误：不支持的格式：2",
  "regex": "error:\\ Setup\\ script\\ exited\\ with\\ error:\\ Unsupported\\ format:\\ 2",
  "domain": "python",
  "category": "install_error",
  "subcategory": null,
  "root_cause": "setup.py 使用了不支持的 setuptools 版本或格式，通常发生在 setuptools 版本过旧与新的 setup.py 语法不兼容时。",
  "root_cause_type": "generic",
  "root_cause_zh": "setup.py 使用了不支持的 setuptools 版本或格式，通常发生在 setuptools 版本过旧与新的 setup.py 语法不兼容时。",
  "versions": [
    {
      "version": "3.6",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "3.7",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "3.8",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    }
  ],
  "os_specific": {},
  "dead_ends": [
    {
      "action": "",
      "why_fails": "问题在于 setuptools 版本，重试不会改变。",
      "fail_rate": 0.9,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "如果 setuptools 版本过旧，直接运行 setup.py 仍会失败。",
      "fail_rate": 0.7,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "",
      "success_rate": 0.8,
      "how": "升级 setuptools：pip install --upgrade setuptools",
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "success_rate": 0.85,
      "how": "在 setup.py 开头添加 from setuptools import setup 并确保使用 setuptools 而不是 distutils",
      "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.84,
  "fix_success_rate": 0.8,
  "resolvable": "true",
  "first_seen": "2024-04-05",
  "last_confirmed": "2025-01-01",
  "last_updated": "2025-01-01",
  "evidence_count": 0,
  "tags": [],
  "locale": "en",
  "aliases": []
}