{
  "id": "python/pip-requirement-parse-error",
  "signature": "ERROR: Invalid requirement: 'requests >=2.0 <3.0' (from line 4 of requirements.txt)\nHint: = is not a valid operator. Did you mean == ?",
  "signature_zh": "错误：无效的需求：'requests >=2.0 <3.0'（来自 requirements.txt 第 4 行）\n提示：= 不是有效的运算符。您是指 == 吗？",
  "regex": "ERROR:\\ Invalid\\ requirement:\\ 'requests\\ >=2\\.0\\ <3\\.0'\\ \\(from\\ line\\ 4\\ of\\ requirements\\.txt\\)\\\nHint:\\ =\\ is\\ not\\ a\\ valid\\ operator\\.\\ Did\\ you\\ mean\\ ==\\ \\?",
  "domain": "python",
  "category": "config_error",
  "subcategory": null,
  "root_cause": "The requirement line has a malformed version specifier, often a single `=` instead of `==`, or a space between operators.",
  "root_cause_type": "generic",
  "root_cause_zh": "需求行的版本说明符格式错误，通常是使用了单个 `=` 而非 `==`，或运算符之间有空格。",
  "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": "requirements.txt is parsed by pip, not the shell; quoting does not change the grammar.",
      "fail_rate": 0.9,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "The parser is strict by design; upgrading does not accept invalid syntax.",
      "fail_rate": 0.85,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "The error occurs during parsing, before resolution.",
      "fail_rate": 0.95,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "",
      "success_rate": 0.98,
      "how": "Change `requests >=2.0 <3.0` to `requests>=2.0,<3.0`",
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "success_rate": 0.9,
      "how": "python -c \"from packaging.requirements import Requirement; [Requirement(l.strip()) for l in open('requirements.txt') if l.strip() and not l.startswith('#')]\"",
      "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.88,
  "fix_success_rate": 0.8,
  "resolvable": "true",
  "first_seen": "2025-07-18",
  "last_confirmed": "2025-01-01",
  "last_updated": "2025-01-01",
  "evidence_count": 0,
  "tags": [],
  "locale": "en",
  "aliases": []
}