{
  "id": "pip/conflict-with-requirements-txt-extra",
  "signature": "ERROR: Invalid requirement: 'package[extra1,extra2]' (line 1 of requirements.txt). Hint: = is not a valid operator. Did you mean == ?",
  "signature_zh": "错误：无效的需求：'package[extra1,extra2]'（requirements.txt 第 1 行）。提示：= 不是有效运算符。您是不是想用 ==？",
  "regex": "ERROR: Invalid requirement: '.*\\[.*\\]'.*Hint: = is not a valid operator",
  "domain": "pip",
  "category": "config_error",
  "subcategory": null,
  "root_cause": "A requirements.txt line uses a single equals sign (=) for version pinning after an extras specification, but pip requires double equals (==) for exact version constraints.",
  "root_cause_type": "generic",
  "root_cause_zh": "requirements.txt 中的一行在 extras 规范后使用了单等号 (=) 进行版本固定，但 pip 要求使用双等号 (==) 表示精确版本约束。",
  "versions": [
    {
      "version": "pip 22.0",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "pip 23.1",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "pip 24.0",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    }
  ],
  "os_specific": {},
  "dead_ends": [
    {
      "action": "Remove the extras brackets entirely and reinstall without extras.",
      "why_fails": "The user may need the extras for functionality; removing them is a workaround but not a fix.",
      "fail_rate": 0.6,
      "condition": "",
      "sources": []
    },
    {
      "action": "Change the operator to >= instead of ==.",
      "why_fails": "The error is about the single equals sign, not the operator type; >= also requires double equals.",
      "fail_rate": 0.9,
      "condition": "",
      "sources": []
    },
    {
      "action": "Ignore the error and use `pip install package[extra1,extra2]==1.0` directly on CLI.",
      "why_fails": "The CLI command works, but the requirements.txt remains broken for future installs or CI.",
      "fail_rate": 0.7,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "Edit requirements.txt to use double equals: `package[extra1,extra2]==1.0`",
      "success_rate": 0.95,
      "how": "Edit requirements.txt to use double equals: `package[extra1,extra2]==1.0`",
      "condition": "",
      "sources": []
    },
    {
      "action": "If no version pin is needed, remove the version specifier: `package[extra1,extra2]`",
      "success_rate": 0.85,
      "how": "If no version pin is needed, remove the version specifier: `package[extra1,extra2]`",
      "condition": "",
      "sources": []
    },
    {
      "action": "Use `pip install -r requirements.txt --no-deps` to bypass the invalid line temporarily, then fix the file.",
      "success_rate": 0.7,
      "how": "Use `pip install -r requirements.txt --no-deps` to bypass the invalid line temporarily, then fix the file.",
      "condition": "",
      "sources": []
    }
  ],
  "workarounds_zh": [
    "编辑 requirements.txt 使用双等号：`package[extra1,extra2]==1.0`",
    "如果不需要固定版本，移除版本说明符：`package[extra1,extra2]`",
    "使用 `pip install -r requirements.txt --no-deps` 临时绕过无效行，然后修复文件。"
  ],
  "transition_graph": {
    "leads_to": [],
    "preceded_by": [],
    "frequently_confused_with": []
  },
  "official_doc_url": "https://pip.pypa.io/en/stable/reference/requirements-file-format/",
  "official_doc_section": null,
  "error_code": "ERROR",
  "verification_tier": "ai_generated",
  "confidence": 0.88,
  "fix_success_rate": 0.95,
  "resolvable": "true",
  "first_seen": "2023-06-10",
  "last_confirmed": "2024-06-01",
  "last_updated": "2024-06-01",
  "evidence_count": 1,
  "tags": [],
  "locale": "en",
  "aliases": []
}