{
  "id": "python/pip-hash-mismatch-download",
  "signature": "ERROR: THESE PACKAGES DO NOT MATCH THE HASHES FROM THE REQUIREMENTS FILE. If you have updated the package versions, please update the hashes. Otherwise, examine the package contents carefully; someone may have tampered with them.",
  "signature_zh": "错误：这些包与需求文件中的哈希值不匹配。如果你更新了包版本，请更新哈希值。否则，请仔细检查包内容；可能有人篡改了它们。",
  "regex": "ERROR:\\ THESE\\ PACKAGES\\ DO\\ NOT\\ MATCH\\ THE\\ HASHES\\ FROM\\ THE\\ REQUIREMENTS\\ FILE\\.\\ If\\ you\\ have\\ updated\\ the\\ package\\ versions,\\ please\\ update\\ the\\ hashes\\.\\ Otherwise,\\ examine\\ the\\ package\\ contents\\ carefully;\\ someone\\ may\\ have\\ tampered\\ with\\ them\\.",
  "domain": "python",
  "category": "auth_error",
  "subcategory": null,
  "root_cause": "A requirements file with --hash=sha256:... pins a specific artifact hash. The downloaded wheel/sdist has a different hash, usually because the version was updated without regenerating hashes, or a different platform wheel was resolved.",
  "root_cause_type": "generic",
  "root_cause_zh": "带有 --hash=sha256:... 的 requirements 文件固定了特定产物的哈希值。下载的 wheel/sdist 哈希不同，通常是因为版本更新后未重新生成哈希，或者解析到了不同的平台 wheel。",
  "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": "Hash checking still applies to the directly requested package.",
      "fail_rate": 0.85,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "Disables supply-chain protection entirely; defeats the purpose of the pin.",
      "fail_rate": 0.3,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "",
      "success_rate": 0.95,
      "how": "pip install pip-tools && pip-compile --generate-hashes requirements.in",
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "success_rate": 0.88,
      "how": "Add another --hash=sha256:<newhash> line to the package entry",
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "success_rate": 0.8,
      "how": "pip download --only-binary=:all: --platform manylinux2014_x86_64 --python-version 311 package && pip hash *.whl",
      "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-06-10",
  "last_confirmed": "2025-01-01",
  "last_updated": "2025-01-01",
  "evidence_count": 0,
  "tags": [],
  "locale": "en",
  "aliases": []
}