{
  "id": "python/setuptools-unknown-distribution-option",
  "signature": "error: option --install-lib not recognized\nusage: setup.py [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]\nor: setup.py --help [cmd1 cmd2 ...]\nor: setup.py --help-commands\nor: setup.py cmd --help",
  "signature_zh": "错误：无法识别选项 --install-lib\n用法：setup.py [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]\n或：setup.py --help [cmd1 cmd2 ...]\n或：setup.py --help-commands\n或：setup.py cmd --help",
  "regex": "error:\\ option\\ \\-\\-install\\-lib\\ not\\ recognized\\\nusage:\\ setup\\.py\\ \\[global_opts\\]\\ cmd1\\ \\[cmd1_opts\\]\\ \\[cmd2\\ \\[cmd2_opts\\]\\ \\.\\.\\.\\]\\\nor:\\ setup\\.py\\ \\-\\-help\\ \\[cmd1\\ cmd2\\ \\.\\.\\.\\]\\\nor:\\ setup\\.py\\ \\-\\-help\\-commands\\\nor:\\ setup\\.py\\ cmd\\ \\-\\-help",
  "domain": "python",
  "category": "config_error",
  "subcategory": null,
  "root_cause": "A custom distutils/setuptools command is invoked with an option it does not declare in user_options, so the option parser rejects it.",
  "root_cause_type": "generic",
  "root_cause_zh": "调用自定义 distutils/setuptools 命令时传入了它未在 user_options 中声明的选项，因此选项解析器拒绝该选项。",
  "versions": [
    {
      "version": "3.x",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    }
  ],
  "os_specific": {},
  "dead_ends": [
    {
      "action": "",
      "why_fails": "The command still does not declare the option; order does not matter.",
      "fail_rate": 0.9,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "Verbosity does not register unknown options.",
      "fail_rate": 0.95,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "Privilege is unrelated to option parsing.",
      "fail_rate": 0.95,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "",
      "success_rate": 0.95,
      "how": "In the Command subclass, add user_options = [('install-lib=', None, 'target directory')] and handle it in initialize_options/finalize_options.",
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "success_rate": 0.9,
      "how": "Move the setting into setup.cfg under [install] install-lib = /path and run python setup.py install.",
      "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.85,
  "fix_success_rate": 0.8,
  "resolvable": "true",
  "first_seen": "2024-04-19",
  "last_confirmed": "2025-01-01",
  "last_updated": "2025-01-01",
  "evidence_count": 0,
  "tags": [],
  "locale": "en",
  "aliases": []
}