# 错误：Wheel 'numpy-1.26.4-cp311-cp311-manylinux_2_17_x86_64.whl' 无效：<pkg> METADATA 错误：zip 文件无效。

- **ID:** `python/pip-cache-corruption-invalid-wheel`
- **领域:** python
- **类别:** data_error
- **验证级别:** ai_generated
- **修复率:** 80%

## 根因

pip 缓存中先前下载的 wheel 被截断或损坏，pip 复用时未重新校验 zip 结构。

## 版本兼容性

| 版本 | 状态 | 引入 | 弃用 |
|------|------|------|------|
| 3.8 | active | — | — |
| 3.9 | active | — | — |
| 3.10 | active | — | — |
| 3.11 | active | — | — |
| 3.12 | active | — | — |

## 解决方案

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

## 无效尝试

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