# 错误：异常：回溯（最近一次调用）：
...
文件 "pip/_vendor/urllib3/response.py"，第 438 行，在 _error_catcher 中
    引发 ProtocolError('连接中断：%r' % e, e)
pip._vendor.urllib3.exceptions.ProtocolError: ('连接中断：IncompleteRead(0 字节已读取)', IncompleteRead(0 字节已读取))

- **ID:** `python/pip-cache-corruption`
- **领域:** python
- **类别:** network_error
- **验证级别:** ai_generated
- **修复率:** 80%

## 根因

损坏的下载缓存导致包安装期间读取不完整。

## 版本兼容性

| 版本 | 状态 | 引入 | 弃用 |
|------|------|------|------|
| 3.8 | active | — | — |
| 3.9 | active | — | — |
| 3.10 | active | — | — |
| 3.11 | active | — | — |
| 3.12 | active | — | — |

## 解决方案

1. **Clear pip's cache and retry** (90% 成功率)
   ```
   pip cache purge && pip install mypackage
   ```
2. **Disable caching for the installation** (85% 成功率)
   ```
   pip install --no-cache-dir mypackage
   ```

## 无效尝试

- **Increasing timeout settings** — The issue is corrupted data, not a timeout. (80% 失败率)
- **Using a different network interface** — The cache is local; network changes don't fix corruption. (90% 失败率)
