{
  "id": "python/setuptools-use-2to3-removed",
  "signature": "error: option --use-2to3 not recognized\nusage: setup.py [global_opts] cmd1 [cmd1_opts] ...\nsetup.py: error: no such option: --use-2to3",
  "signature_zh": "错误：无法识别的选项 --use-2to3\n用法：setup.py [global_opts] cmd1 [cmd1_opts] ...\nsetup.py: 错误：无此选项：--use-2to3",
  "regex": "error:\\ option\\ \\-\\-use\\-2to3\\ not\\ recognized\\\nusage:\\ setup\\.py\\ \\[global_opts\\]\\ cmd1\\ \\[cmd1_opts\\]\\ \\.\\.\\.\\\nsetup\\.py:\\ error:\\ no\\ such\\ option:\\ \\-\\-use\\-2to3",
  "domain": "python",
  "category": "install_error",
  "subcategory": null,
  "root_cause": "setuptools 58+ removed the 2to3 build support. Packages with `use_2to3=True` in setup.py now fail because the option no longer exists.",
  "root_cause_type": "generic",
  "root_cause_zh": "setuptools 58+ 移除了 2to3 构建支持。setup.py 中带有 `use_2to3=True` 的包现在会失败，因为该选项已不存在。",
  "versions": [
    {
      "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"
    },
    {
      "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"
    }
  ],
  "os_specific": {},
  "dead_ends": [
    {
      "action": "",
      "why_fails": "Many legacy packages are unmaintained; the latest release still contains use_2to3=True.",
      "fail_rate": 0.7,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "The 2to3 tool is part of the stdlib; installing a package named 2to3 does not restore setuptools' removed option.",
      "fail_rate": 0.95,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "",
      "success_rate": 0.8,
      "how": "pip install 'setuptools<58' wheel\npip install --no-build-isolation <package>",
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "success_rate": 0.75,
      "how": "pip install --only-binary=:all: <package>",
      "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-02-15",
  "last_confirmed": "2025-01-01",
  "last_updated": "2025-01-01",
  "evidence_count": 0,
  "tags": [],
  "locale": "en",
  "aliases": []
}