{
  "id": "python/pip-cache-corrupted-unexpected-eof",
  "signature": "ERROR: Exception: Traceback (most recent call last): ... zipfile.BadZipFile: File is not a zip file",
  "signature_zh": "错误：异常：回溯（最近一次调用最后）：... zipfile.BadZipFile: 文件不是 zip 文件",
  "regex": "ERROR:\\ Exception:\\ Traceback\\ \\(most\\ recent\\ call\\ last\\):\\ \\.\\.\\.\\ zipfile\\.BadZipFile:\\ File\\ is\\ not\\ a\\ zip\\ file",
  "domain": "python",
  "category": "data_error",
  "subcategory": null,
  "root_cause": "pip's HTTP cache or wheel cache contains a corrupted download, often due to interrupted network transfer or disk write errors. pip attempts to read the cached file as a zip archive but fails.",
  "root_cause_type": "generic",
  "root_cause_zh": "pip 的 HTTP 缓存或 wheel 缓存中包含损坏的下载文件，通常是由于网络传输中断或磁盘写入错误导致。pip 尝试将缓存文件作为 zip 归档读取时失败。",
  "versions": [
    {
      "version": "3.7",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "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": "Reinstalling pip does not clear the corrupted cache; the bad file remains and will be reused.",
      "fail_rate": 0.8,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "Force reinstall still reads from cache first; corrupted cache causes the same error.",
      "fail_rate": 0.75,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "",
      "success_rate": 0.95,
      "how": "Clear pip's cache: pip cache purge, then retry the installation.",
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "success_rate": 0.9,
      "how": "Bypass cache for a single install: pip install --no-cache-dir <package>.",
      "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.87,
  "fix_success_rate": 0.8,
  "resolvable": "true",
  "first_seen": "2024-02-20",
  "last_confirmed": "2025-01-01",
  "last_updated": "2025-01-01",
  "evidence_count": 0,
  "tags": [],
  "locale": "en",
  "aliases": []
}