{
  "id": "pip/zip-deflate-error",
  "signature": "ERROR: Could not install packages due to a ZipError: [Errno 2] No such file or directory: '/path/to/package.whl'",
  "signature_zh": "错误：由于 ZipError 无法安装包：[Errno 2] 没有那个文件或目录: '/path/to/package.whl'",
  "regex": "ERROR: Could not install packages due to a ZipError:.*No such file or directory:.*\\.whl",
  "domain": "pip",
  "category": "data_error",
  "subcategory": null,
  "root_cause": "pip encounters a corrupted or incomplete .whl file during installation, often caused by interrupted download or filesystem issues like a full disk or bad sectors.",
  "root_cause_type": "generic",
  "root_cause_zh": "pip 在安装过程中遇到损坏或不完整的 .whl 文件，通常由下载中断或文件系统问题（如磁盘满或坏扇区）引起。",
  "versions": [
    {
      "version": "pip 23.1",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "pip 24.0",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "Python 3.10",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "Python 3.11",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    }
  ],
  "os_specific": {},
  "dead_ends": [
    {
      "action": "",
      "why_fails": "Running pip install --no-cache-dir does not fix the corrupted .whl; it only bypasses the cache but the download may still be corrupt.",
      "fail_rate": 0.7,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "Using pip install --force-reinstall only re-downloads the same corrupted wheel if the source is bad.",
      "fail_rate": 0.85,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "Setting PIP_REQUIRE_VIRTUALENV does not address the file corruption; it's unrelated to disk or download issues.",
      "fail_rate": 0.95,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "Clear pip's cache and re-download: pip cache purge && pip install package --no-cache-dir",
      "success_rate": 0.9,
      "how": "Clear pip's cache and re-download: pip cache purge && pip install package --no-cache-dir",
      "condition": "",
      "sources": []
    },
    {
      "action": "Manually delete the specific .whl file from pip's cache directory: rm -rf ~/.cache/pip/http/* && pip install package",
      "success_rate": 0.88,
      "how": "Manually delete the specific .whl file from pip's cache directory: rm -rf ~/.cache/pip/http/* && pip install package",
      "condition": "",
      "sources": []
    },
    {
      "action": "If the disk is full, free up space: df -h . && rm -rf /tmp/pip-* && pip install package",
      "success_rate": 0.95,
      "how": "If the disk is full, free up space: df -h . && rm -rf /tmp/pip-* && pip install package",
      "condition": "",
      "sources": []
    }
  ],
  "workarounds_zh": [
    "Clear pip's cache and re-download: pip cache purge && pip install package --no-cache-dir",
    "Manually delete the specific .whl file from pip's cache directory: rm -rf ~/.cache/pip/http/* && pip install package",
    "If the disk is full, free up space: df -h . && rm -rf /tmp/pip-* && pip install package"
  ],
  "transition_graph": {
    "leads_to": [],
    "preceded_by": [],
    "frequently_confused_with": []
  },
  "official_doc_url": "https://pip.pypa.io/en/stable/topics/local-project-installs/",
  "official_doc_section": null,
  "error_code": "ERROR",
  "verification_tier": "ai_generated",
  "confidence": 0.82,
  "fix_success_rate": 0.85,
  "resolvable": "true",
  "first_seen": "2023-09-20",
  "last_confirmed": "2024-06-01",
  "last_updated": "2024-06-01",
  "evidence_count": 1,
  "tags": [],
  "locale": "en",
  "aliases": []
}