{
  "id": "python/pip-requirement-parse-invalid-editable",
  "signature": "ERROR: Invalid requirement: '-e git+https://github.com/org/repo.git@main#egg=foo' (from line 3 of requirements.txt)\nHint: It looks like a path. File 'requirements.txt' does not exist.",
  "signature_zh": "错误：无效需求：'-e git+https://github.com/org/repo.git@main#egg=foo'（来自 requirements.txt 第 3 行）\n提示：看起来像路径。文件 'requirements.txt' 不存在。",
  "regex": "ERROR:\\ Invalid\\ requirement:\\ '\\-e\\ git\\+https://github\\.com/org/repo\\.git@main\\#egg=foo'\\ \\(from\\ line\\ 3\\ of\\ requirements\\.txt\\)\\\nHint:\\ It\\ looks\\ like\\ a\\ path\\.\\ File\\ 'requirements\\.txt'\\ does\\ not\\ exist\\.",
  "domain": "python",
  "category": "data_error",
  "subcategory": null,
  "root_cause": "pip parsed a requirement line incorrectly, often due to a stray space after -e, a BOM/encoding issue, or the line being read as an argument rather than a requirement.",
  "root_cause_type": "generic",
  "root_cause_zh": "pip 错误解析需求行，通常由于 -e 后多余空格、BOM/编码问题，或该行被当作参数而非需求读取。",
  "versions": [
    {
      "version": "3.8+",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    }
  ],
  "os_specific": {},
  "dead_ends": [
    {
      "action": "",
      "why_fails": "Loses editable mode; changes how the package resolves imports and breaks local development workflow.",
      "fail_rate": 0.7,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "pip does not strip shell-style quotes from requirements lines; the quoted string becomes an invalid requirement.",
      "fail_rate": 0.85,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "",
      "success_rate": 0.92,
      "how": "# requirements.txt\n-e git+https://github.com/org/repo.git@main#egg=foo\n# ensure UTF-8 without BOM; one requirement per line",
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "success_rate": 0.88,
      "how": "python -c \"import sys; open('requirements.txt', encoding='utf-8-sig').read()\"\n# convert BOM:\nsed -i '1s/^\\xEF\\xBB\\xBF//' requirements.txt\npip install -r requirements.txt",
      "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.83,
  "fix_success_rate": 0.8,
  "resolvable": "true",
  "first_seen": "2024-07-07",
  "last_confirmed": "2025-01-01",
  "last_updated": "2025-01-01",
  "evidence_count": 0,
  "tags": [],
  "locale": "en",
  "aliases": []
}