# 错误：这些包与需求文件中的哈希不匹配。如果您更新了包版本，请更新哈希。

- **ID:** `python/pip-install-hash-mismatch`
- **领域:** python
- **类别:** install_error
- **验证级别:** ai_generated
- **修复率:** 80%

## 根因

下载的包的哈希与需求文件中指定的哈希不匹配，表明下载损坏或包已更改。

## 版本兼容性

| 版本 | 状态 | 引入 | 弃用 |
|------|------|------|------|
| 3.x | active | — | — |

## 解决方案

1. **** (90% 成功率)
   ```
   pip hash package.whl  # then update requirements.txt with new hash
   ```
2. **** (85% 成功率)
   ```
   pip install --require-hashes -r requirements.txt  # after updating hashes
   ```

## 无效尝试

- **** — Loses the security benefit of hash checking; not recommended. (70% 失败率)
- **** — If the package on the index has changed, retrying will still fail. (60% 失败率)
