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, update the hashes. Otherwise, remove the file.

ID: python/pip-package-hash-mismatch

Also available as: JSON · Markdown · 中文
80%Fix Rate
85%Confidence
0Evidence
2025-12-01First Seen

Version Compatibility

VersionStatusIntroducedDeprecatedNotes
3.10 active

Root Cause

The downloaded package hash does not match the hash specified in a requirements file with --hash constraints.

generic

中文

下载的包哈希与带有--hash约束的requirements文件中指定的哈希不匹配。

Workarounds

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

Dead Ends

Common approaches that don't work:

  1. Ignoring hashes with --no-hash-check 40% fail

    Bypasses security checks; may install malicious package.

  2. Re-downloading the same package 80% fail

    Hash mismatch persists if package was updated on server.