# ERROR: Could not install packages due to a ZipError: [Errno 2] No such file or directory: '/path/to/package.whl'

- **ID:** `pip/zip-deflate-error`
- **Domain:** pip
- **Category:** data_error
- **Error Code:** `ERROR`
- **Verification:** ai_generated
- **Fix Rate:** 85%

## 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.

## Version Compatibility

| Version | Status | Introduced | Deprecated |
|---------|--------|------------|------------|
| pip 23.1 | active | — | — |
| pip 24.0 | active | — | — |
| Python 3.10 | active | — | — |
| Python 3.11 | active | — | — |

## Workarounds

1. **Clear pip's cache and re-download: pip cache purge && pip install package --no-cache-dir** (90% success)
   ```
   Clear pip's cache and re-download: pip cache purge && pip install package --no-cache-dir
   ```
2. **Manually delete the specific .whl file from pip's cache directory: rm -rf ~/.cache/pip/http/* && pip install package** (88% success)
   ```
   Manually delete the specific .whl file from pip's cache directory: rm -rf ~/.cache/pip/http/* && pip install package
   ```
3. **If the disk is full, free up space: df -h . && rm -rf /tmp/pip-* && pip install package** (95% success)
   ```
   If the disk is full, free up space: df -h . && rm -rf /tmp/pip-* && pip install package
   ```

## Dead Ends

- **** — Running pip install --no-cache-dir does not fix the corrupted .whl; it only bypasses the cache but the download may still be corrupt. (70% fail)
- **** — Using pip install --force-reinstall only re-downloads the same corrupted wheel if the source is bad. (85% fail)
- **** — Setting PIP_REQUIRE_VIRTUALENV does not address the file corruption; it's unrelated to disk or download issues. (95% fail)
