{
  "id": "python/setuptools-version-parse-error-invalid-requirement",
  "signature": "pkg_resources.extern.packaging.requirements.InvalidRequirement: Expected end or semicolon (after version specifier)\n    foo>=1.0<2.0\n        ~~~~^",
  "signature_zh": "pkg_resources.extern.packaging.requirements.InvalidRequirement: 期望结尾或分号（版本说明符之后）\n    foo>=1.0<2.0\n        ~~~~^",
  "regex": "pkg_resources\\.extern\\.packaging\\.requirements\\.InvalidRequirement:\\ Expected\\ end\\ or\\ semicolon\\ \\(after\\ version\\ specifier\\)\\\n\\ \\ \\ \\ foo>=1\\.0<2\\.0\\\n\\ \\ \\ \\ \\ \\ \\ \\ \\~\\~\\~\\~\\^",
  "domain": "python",
  "category": "data_error",
  "subcategory": null,
  "root_cause": "A requirement string contains two version specifiers without a comma (e.g. `>=1.0<2.0`), which the PEP 508 parser rejects.",
  "root_cause_type": "generic",
  "root_cause_zh": "某个依赖字符串包含两个未用逗号分隔的版本说明符（如 `>=1.0<2.0`），PEP 508 解析器会拒绝。",
  "versions": [
    {
      "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"
    },
    {
      "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": "They are not shell metacharacters inside a Python string; escaping does nothing.",
      "fail_rate": 0.9,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "The string is genuinely malformed regardless of parser version.",
      "fail_rate": 0.8,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "",
      "success_rate": 0.98,
      "how": "Insert a comma between specifiers: `foo>=1.0,<2.0` in install_requires / pyproject.toml.",
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "success_rate": 0.9,
      "how": "Validate requirements with `python -c \"from packaging.requirements import Requirement; Requirement('foo>=1.0,<2.0')\"` before packaging.",
      "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.87,
  "fix_success_rate": 0.8,
  "resolvable": "true",
  "first_seen": "2024-06-28",
  "last_confirmed": "2025-01-01",
  "last_updated": "2025-01-01",
  "evidence_count": 0,
  "tags": [],
  "locale": "en",
  "aliases": []
}