{
  "id": "python/pip-requires-python-metadata-missing",
  "signature": "WARNING: Ignoring invalid distribution -ip (c:\\python311\\lib\\site-packages)\nERROR: Invalid requirement: 'foo=>1.0' (from line 1 of requirements.txt)\nHint: = is not a valid operator. Did you mean == ?",
  "signature_zh": "警告：忽略无效的分发 -ip（位于 site-packages）。错误：无效的需求：'foo=>1.0'（来自 requirements.txt 第 1 行）。提示：= 不是有效运算符，是否想用 ==？",
  "regex": "WARNING:\\ Ignoring\\ invalid\\ distribution\\ \\-ip\\ \\(c:\\\\python311\\\\lib\\\\site\\-packages\\)\\\nERROR:\\ Invalid\\ requirement:\\ 'foo=>1\\.0'\\ \\(from\\ line\\ 1\\ of\\ requirements\\.txt\\)\\\nHint:\\ =\\ is\\ not\\ a\\ valid\\ operator\\.\\ Did\\ you\\ mean\\ ==\\ \\?",
  "domain": "python",
  "category": "config_error",
  "subcategory": null,
  "root_cause": "The requirements file uses an invalid version operator (=> instead of >=) or a malformed specifier that packaging rejects. Additionally a partially uninstalled distribution left a '~ip' or '-ip' stub directory in site-packages.",
  "root_cause_type": "generic",
  "root_cause_zh": "requirements 文件使用了无效的版本运算符（=> 而非 >=）或 packaging 拒绝的格式错误说明符。此外，部分卸载的发行版在 site-packages 中残留了 '~ip' 或 '-ip' 存根目录。",
  "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": "The syntax error is in the requirements file, not pip; upgrading changes nothing and the invalid operator still fails.",
      "fail_rate": 0.9,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "Overly destructive; breaks the base interpreter and does not fix the malformed requirements line.",
      "fail_rate": 0.7,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "",
      "success_rate": 0.93,
      "how": "sed -i 's/=>/>=/g' requirements.txt\n# remove leftover '~' dirs\nfind $(python -c 'import site; print(site.getsitepackages()[0])') -maxdepth 1 -name '~*' -exec rm -rf {} +\npip install -r requirements.txt",
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "success_rate": 0.9,
      "how": "python -c \"from packaging.requirements import Requirement; [Requirement(l) 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.82,
  "fix_success_rate": 0.8,
  "resolvable": "true",
  "first_seen": "2024-06-11",
  "last_confirmed": "2025-01-01",
  "last_updated": "2025-01-01",
  "evidence_count": 0,
  "tags": [],
  "locale": "en",
  "aliases": []
}