python
system_error
ai_generated
true
ERROR: Could not install packages due to an EnvironmentError: [Errno 13] Permission denied: '/usr/local/lib/python3.11/site-packages/package'
ID: python/pip-permission-denied
80%Fix Rate
89%Confidence
0Evidence
2024-04-22First Seen
Version Compatibility
| Version | Status | Introduced | Deprecated | Notes |
|---|---|---|---|---|
| 3.10 | active | — | — | — |
Root Cause
The user does not have write permissions to the site-packages directory, often due to system Python installation.
generic中文
用户对site-packages目录没有写权限,通常由于系统Python安装。
Workarounds
-
95% success
python -m venv venv && source venv/bin/activate && pip install package
-
80% success
pip install --user package
-
85% success
pipx install package
Dead Ends
Common approaches that don't work:
-
50% fail
Risky and may corrupt system packages.
-
70% fail
May break system Python integrity.
-
40% fail
Installs to user site but may not be in PATH.