python
data_error
ai_generated
true
错误:这些包与需求文件中的哈希不匹配。如果您已更新包版本,请更新哈希值。
ERROR: THESE PACKAGES DO NOT MATCH THE HASHES FROM THE REQUIREMENTS FILE. If you have updated the package versions, please update the hashes.
ID: python/pip-cache-corrupted-wheel
80%修复率
86%置信度
0证据数
2025-02-08首次发现
版本兼容性
| 版本 | 状态 | 引入 | 弃用 | 备注 |
|---|---|---|---|---|
| 3.x | active | — | — | — |
根因分析
缓存的 wheel 与 requirements 中固定的哈希不匹配,通常由于缓存损坏或源更改。
English
Cached wheel differs from the hash pinned in requirements, often due to a corrupted cache or changed source.
解决方案
-
90% 成功率
pip cache purge pip install --require-hashes -r requirements.txt
-
85% 成功率
pip-compile --generate-hashes requirements.in
无效尝试
常见但无效的做法:
-
70% 失败
Hash check still applies to the downloaded artifact.
-
60% 失败
Weakens supply-chain security and may violate policy.