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

其他格式: JSON · Markdown 中文 · English
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.

generic

解决方案

  1. 90% 成功率
    pip cache purge
    pip install --require-hashes -r requirements.txt
  2. 85% 成功率
    pip-compile --generate-hashes requirements.in

无效尝试

常见但无效的做法:

  1. 70% 失败

    Hash check still applies to the downloaded artifact.

  2. 60% 失败

    Weakens supply-chain security and may violate policy.