{
  "id": "python/pip-invalid-requirement-no-such-option",
  "signature": "ERROR: Invalid requirement: 'requests==2.31.0 --no-deps'",
  "signature_zh": "错误：无效的依赖项：'requests==2.31.0 --no-deps'",
  "regex": "ERROR:\\ Invalid\\ requirement:\\ 'requests==2\\.31\\.0\\ \\-\\-no\\-deps'",
  "domain": "python",
  "category": "install_error",
  "subcategory": null,
  "root_cause": "pip parses requirement strings as PEP 508 syntax; flags like --no-deps cannot be embedded inside a requirement specifier and must be passed as separate CLI arguments.",
  "root_cause_type": "generic",
  "root_cause_zh": "pip 将依赖项字符串按 PEP 508 语法解析；像 --no-deps 这样的标志不能嵌入到依赖项说明符中，必须作为单独的 CLI 参数传递。",
  "versions": [
    {
      "version": "3.x",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    }
  ],
  "os_specific": {},
  "dead_ends": [
    {
      "action": "",
      "why_fails": "Quoting does not change parsing; pip still treats the quoted text as one requirement and rejects the option token.",
      "fail_rate": 0.85,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "requirements.txt lines are requirement specifiers, not command lines; pip errors out on the same Invalid requirement message.",
      "fail_rate": 0.9,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "Backslashes are not valid in PEP 508 requirement names and produce a different parse error.",
      "fail_rate": 0.95,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "",
      "success_rate": 0.99,
      "how": "pip install --no-deps 'requests==2.31.0'",
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "success_rate": 0.98,
      "how": "echo 'requests==2.31.0' > req.txt\npip install --no-deps -r req.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.88,
  "fix_success_rate": 0.8,
  "resolvable": "true",
  "first_seen": "2024-03-12",
  "last_confirmed": "2025-01-01",
  "last_updated": "2025-01-01",
  "evidence_count": 0,
  "tags": [],
  "locale": "en",
  "aliases": []
}