# ERROR: Can't determine which entry to delete from cache: ...

- **ID:** `python/pip-cache-corruption-error`
- **Domain:** python
- **Category:** system_error
- **Verification:** ai_generated
- **Fix Rate:** 80%

## Root Cause

The pip cache directory is corrupted, possibly due to concurrent pip processes or disk errors.

## Version Compatibility

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

## Workarounds

1. **Clear the entire pip cache** (95% success)
   ```
   `pip cache purge` or manually delete the cache directory (e.g., `rm -rf ~/.cache/pip` on Linux/macOS or `%LocalAppData%\pip\cache` on Windows)
   ```
2. **Use a different cache directory** (85% success)
   ```
   Set `PIP_CACHE_DIR` environment variable to a new path: `export PIP_CACHE_DIR=/tmp/pipcache` then run pip.
   ```

## Dead Ends

- **Reinstalling pip with `pip install --upgrade pip`** — Reinstalling pip does not fix the cache; it only updates the pip executable. (70% fail)
- **Running pip with --no-cache-dir temporarily** — This bypasses the cache but does not fix the underlying corruption, which may affect other operations. (40% fail)
