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

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

generic

解决方案

  1. 90% 成功率 Update hashes in requirements file
    pip hash package.whl
    # Update the hash in requirements.txt
  2. 85% 成功率 Regenerate requirements file with hashes
    pip freeze --hash > requirements.txt

无效尝试

常见但无效的做法:

  1. Ignoring hashes with --no-hash-check 40% 失败

    Bypasses security checks; may install malicious package.

  2. Re-downloading the same package 80% 失败

    Hash mismatch persists if package was updated on server.