python
config_error
ai_generated
true
ERROR: Can not perform a '--user' install. User site-packages are not visible in this virtualenv.
ID: python/pip-install-location-error
80%Fix Rate
87%Confidence
0Evidence
2025-09-20First Seen
Version Compatibility
| Version | Status | Introduced | Deprecated | Notes |
|---|---|---|---|---|
| 3.11 | active | — | — | — |
Root Cause
The user is trying to use --user flag inside a virtual environment, which is not allowed because user site-packages are disabled.
generic中文
用户尝试在虚拟环境中使用--user标志,这是不允许的,因为用户site-packages被禁用。
Workarounds
-
90% success
pip install package
-
80% success
python -m venv --system-site-packages venv && source venv/bin/activate && pip install --user package
-
85% success
Deactivate venv and run pip install --user package
Dead Ends
Common approaches that don't work:
-
60% fail
Installs into virtualenv, which may be fine but not user-level.
-
70% fail
Loses isolation.
-
50% fail
Exposes system packages, may conflict.