python
install_error
ai_generated
true
错误:这些包与requirements文件中的哈希不匹配。如果您更新了包版本,请更新哈希。否则,请删除文件。
ERROR: THESE PACKAGES DO NOT MATCH THE HASHES FROM THE REQUIREMENTS FILE. If you have updated the package versions, update the hashes. Otherwise, remove the file.
ID: python/pip-package-hash-mismatch
80%修复率
85%置信度
0证据数
2025-12-01首次发现
版本兼容性
| 版本 | 状态 | 引入 | 弃用 | 备注 |
|---|---|---|---|---|
| 3.10 | active | — | — | — |
根因分析
下载的包哈希与带有--hash约束的requirements文件中指定的哈希不匹配。
English
The downloaded package hash does not match the hash specified in a requirements file with --hash constraints.
解决方案
-
90% 成功率 Update hashes in requirements file
pip hash package.whl # Update the hash in requirements.txt
-
85% 成功率 Regenerate requirements file with hashes
pip freeze --hash > requirements.txt
无效尝试
常见但无效的做法:
-
Ignoring hashes with --no-hash-check
40% 失败
Bypasses security checks; may install malicious package.
-
Re-downloading the same package
80% 失败
Hash mismatch persists if package was updated on server.