python
data_error
ai_generated
true
错误:Wheel 'numpy-1.26.4-cp311-cp311-manylinux_2_17_x86_64.whl' 无效:<pkg> METADATA 错误:zip 文件无效。
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
80%修复率
88%置信度
0证据数
2024-11-21首次发现
版本兼容性
| 版本 | 状态 | 引入 | 弃用 | 备注 |
|---|---|---|---|---|
| 3.8 | active | — | — | — |
| 3.9 | active | — | — | — |
| 3.10 | active | — | — | — |
| 3.11 | active | — | — | — |
| 3.12 | active | — | — | — |
根因分析
pip 缓存中先前下载的 wheel 被截断或损坏,pip 复用时未重新校验 zip 结构。
English
A previously downloaded wheel in the pip cache is truncated or corrupted, and pip reuses it without re-validating the zip structure.
解决方案
-
95% 成功率
Purge the cache and reinstall: `pip cache purge && pip install --no-cache-dir <pkg>`.
-
92% 成功率
Inspect and remove the specific cached wheel: `pip cache list <pkg>` then `pip cache remove <pkg>`.
无效尝试
常见但无效的做法:
-
90% 失败
Disables index lookup entirely, so pip cannot refetch the corrupted wheel.
-
70% 失败
Force-reinstall still consults the cache and can reuse the same corrupted file.