# 错误：这些包与需求文件中的哈希值不匹配。
    期望 sha256 abc...
         实际 def...
    /root/.cache/pip/wheels/.../mypkg-1.0-py3-none-any.whl

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

## 根因

~/.cache/pip 中的缓存 wheel 已损坏或由不同源码构建，因此其哈希不再与固定值匹配。

## 版本兼容性

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

## 解决方案

1. **** (97% 成功率)
   ```
   pip cache purge
pip install --no-cache-dir -r requirements.txt
   ```
2. **** (95% 成功率)
   ```
   rm -rf ~/.cache/pip/wheels
pip install -r requirements.txt
   ```

## 无效尝试

- **** — Force reinstall still consults the cache and reuses the corrupted wheel. (80% 失败率)
- **** — Does not bypass hash verification or cache lookup. (90% 失败率)
- **** — Only affects TLS trust, not wheel hash verification. (95% 失败率)
