python
install_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-install-hash-mismatch
80%修复率
86%置信度
0证据数
2024-08-30首次发现
版本兼容性
| 版本 | 状态 | 引入 | 弃用 | 备注 |
|---|---|---|---|---|
| 3.x | active | — | — | — |
根因分析
下载的包的哈希与需求文件中指定的哈希不匹配,表明下载损坏或包已更改。
English
The downloaded package's hash does not match the hash specified in the requirements file, indicating a corrupted download or a changed package.
解决方案
-
90% 成功率
pip hash package.whl # then update requirements.txt with new hash
-
85% 成功率
pip install --require-hashes -r requirements.txt # after updating hashes
无效尝试
常见但无效的做法:
-
70% 失败
Loses the security benefit of hash checking; not recommended.
-
60% 失败
If the package on the index has changed, retrying will still fail.