{
  "id": "python/pip-requirements-duplicate-entry",
  "signature": "WARNING: Duplicate entry in requirements file: numpy==1.21.0 (line 3) and numpy==1.22.0 (line 5)",
  "signature_zh": "警告：requirements文件中存在重复条目：第3行numpy==1.21.0和第5行numpy==1.22.0",
  "regex": "WARNING:\\ Duplicate\\ entry\\ in\\ requirements\\ file:\\ numpy==1\\.21\\.0\\ \\(line\\ 3\\)\\ and\\ numpy==1\\.22\\.0\\ \\(line\\ 5\\)",
  "domain": "python",
  "category": "config_error",
  "subcategory": null,
  "root_cause": "The same package is listed with different versions in the requirements file, causing ambiguity.",
  "root_cause_type": "generic",
  "root_cause_zh": "requirements文件中同一包列出了不同版本，导致歧义。",
  "versions": [
    {
      "version": "3.9",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    }
  ],
  "os_specific": {},
  "dead_ends": [
    {
      "action": "Keeping both entries",
      "why_fails": "Pip will use the last occurrence, which may not be intended.",
      "fail_rate": 0.5,
      "condition": "",
      "sources": []
    },
    {
      "action": "Ignoring the warning",
      "why_fails": "May install unexpected version; conflicts later.",
      "fail_rate": 0.6,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "Remove duplicate and keep only one version",
      "success_rate": 0.95,
      "how": "# Edit requirements.txt to keep only one line\nnumpy==1.22.0",
      "condition": "",
      "sources": []
    },
    {
      "action": "Use pip-compile to resolve dependencies automatically",
      "success_rate": 0.9,
      "how": "pip install pip-tools\npip-compile requirements.in",
      "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.85,
  "fix_success_rate": 0.8,
  "resolvable": "true",
  "first_seen": "2025-11-18",
  "last_confirmed": "2025-01-01",
  "last_updated": "2025-01-01",
  "evidence_count": 0,
  "tags": [],
  "locale": "en",
  "aliases": []
}