# ERROR: Invalid archive format: /tmp/pip-install-xxx/package.tar.gz

- **ID:** `python/pip-invalid-archive-format`
- **Domain:** python
- **Category:** install_error
- **Verification:** ai_generated
- **Fix Rate:** 80%

## Root Cause

The downloaded package archive is corrupted or not a valid tar.gz file.

## Version Compatibility

| Version | Status | Introduced | Deprecated |
|---------|--------|------------|------------|
| 3.9 | active | — | — |

## Workarounds

1. **Clear pip cache and retry with different index** (85% success)
   ```
   pip cache purge
pip install package -i https://pypi.org/simple/
   ```
2. **Download and install from a local wheel** (80% success)
   ```
   pip download package
pip install ./package.whl
   ```

## Dead Ends

- **Re-running pip without cache** — Redownloads same corrupted file from mirror if issue persists. (70% fail)
- **Manually extracting archive** — Archive is corrupt; extraction fails. (90% fail)
