# ERROR: Exception: Traceback (most recent call last): ... zipfile.BadZipFile: File is not a zip file

- **ID:** `python/pip-cache-corrupted-unexpected-eof`
- **Domain:** python
- **Category:** data_error
- **Verification:** ai_generated
- **Fix Rate:** 80%

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

## Version Compatibility

| Version | Status | Introduced | Deprecated |
|---------|--------|------------|------------|
| 3.7 | active | — | — |
| 3.8 | active | — | — |
| 3.9 | active | — | — |
| 3.10 | active | — | — |
| 3.11 | active | — | — |
| 3.12 | active | — | — |

## Workarounds

1. **** (95% success)
   ```
   Clear pip's cache: pip cache purge, then retry the installation.
   ```
2. **** (90% success)
   ```
   Bypass cache for a single install: pip install --no-cache-dir <package>.
   ```

## Dead Ends

- **** — Reinstalling pip does not clear the corrupted cache; the bad file remains and will be reused. (80% fail)
- **** — Force reinstall still reads from cache first; corrupted cache causes the same error. (75% fail)
