# pip._vendor.urllib3.exceptions.ProtocolError: ('Connection broken: IncompleteRead(0 bytes read, 12345 more expected)', IncompleteRead(0 bytes read, 12345 more expected))

- **ID:** `python/pip-connection-broken-incompleteread`
- **Domain:** python
- **Category:** network_error
- **Verification:** ai_generated
- **Fix Rate:** 80%

## Root Cause

The download connection was cut mid-transfer by a proxy, firewall, flaky network, or a CDN edge — pip received fewer bytes than the Content-Length promised.

## Version Compatibility

| Version | Status | Introduced | Deprecated |
|---------|--------|------------|------------|
| 3.8 | active | — | — |
| 3.9 | active | — | — |
| 3.10 | active | — | — |
| 3.11 | active | — | — |
| 3.12 | active | — | — |

## Workarounds

1. **** (75% success)
   ```
   pip install --timeout 120 --retries 10 <pkg>
   ```
2. **** (85% success)
   ```
   pip download --no-deps <pkg> -d ./wheels
# or
curl -L --retry 5 -o ./wheels/<wheel> https://files.pythonhosted.org/...
pip install --no-index --find-links ./wheels <pkg>
   ```
3. **** (70% success)
   ```
   pip install -i https://pypi.tuna.tsinghua.edu.cn/simple <pkg>
# or your org's mirror
   ```

## Dead Ends

- **** — Transient but recurs on large packages; wastes time and bandwidth. (70% fail)
- **** — The failure is a truncated body, not a certificate problem. (90% fail)
- **** — Doesn't address proxy/network truncation. (80% fail)
