# ERROR: Exception:
Traceback (most recent call last):
  File "...", line 1, in <module>
PermissionError: [Errno 13] Permission denied: '/usr/lib/python3.11/site-packages/foo/__init__.py'

- **ID:** `python/pip-uninstall-permission-denied`
- **Domain:** python
- **Category:** system_error
- **Verification:** ai_generated
- **Fix Rate:** 80%

## Root Cause

pip is trying to modify a site-packages directory owned by root (or another user), but the current user lacks write permission.

## Version Compatibility

| Version | Status | Introduced | Deprecated |
|---------|--------|------------|------------|
| 3.x | active | — | — |

## Workarounds

1. **** (98% success)
   ```
   python3 -m venv ~/.venvs/app
source ~/.venvs/app/bin/activate
python -m pip install foo
   ```
2. **** (90% success)
   ```
   python -m pip install --user --force-reinstall foo
# ensure ~/.local/bin is on PATH
export PATH="$HOME/.local/bin:$PATH"
   ```

## Dead Ends

- **** — Weakens system security and can break imports for other users; does not address the real fix. (85% fail)
- **** — Leaves the old root-owned copy in place, causing import shadowing and version confusion. (70% fail)
