# ERROR: Wheel 'numpy-1.26.4-cp311-cp311-manylinux_2_17_x86_64.whl' is invalid: error in <pkg> METADATA: invalid zip file

- **ID:** `python/pip-cache-corruption-invalid-wheel`
- **Domain:** python
- **Category:** data_error
- **Verification:** ai_generated
- **Fix Rate:** 80%

## Root Cause

A previously downloaded wheel in the pip cache is truncated or corrupted, and pip reuses it without re-validating the zip structure.

## Version Compatibility

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

## Workarounds

1. **** (95% success)
   ```
   Purge the cache and reinstall: `pip cache purge && pip install --no-cache-dir <pkg>`.
   ```
2. **** (92% success)
   ```
   Inspect and remove the specific cached wheel: `pip cache list <pkg>` then `pip cache remove <pkg>`.
   ```

## Dead Ends

- **** — Disables index lookup entirely, so pip cannot refetch the corrupted wheel. (90% fail)
- **** — Force-reinstall still consults the cache and can reuse the same corrupted file. (70% fail)
