# ERROR: Could not install packages due to an OSError: [Errno 13] Permission denied: '/usr/local/lib/python3.11/site-packages/foo'

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

## Root Cause

Installing into a system-wide site-packages without write permission.

## Version Compatibility

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

## Workarounds

1. **** (95% success)
   ```
   python -m venv .venv && source .venv/bin/activate && pip install foo
   ```
2. **** (90% success)
   ```
   pip install --user foo
   ```

## Dead Ends

- **** — Mixes root-owned files into user environment, causing future permission errors and security risks. (50% fail)
- **** — Weakens system security and does not address root cause. (80% fail)
