python
config_error
ai_generated
true
WARNING: The script somecli is installed in '/home/user/.local/bin' which is not on PATH.
ID: python/pip-install-scripts-not-on-path
80%Fix Rate
88%Confidence
0Evidence
2025-04-11First Seen
Version Compatibility
| Version | Status | Introduced | Deprecated | Notes |
|---|---|---|---|---|
| 3.8 | active | — | — | — |
| 3.9 | active | — | — | — |
| 3.10 | active | — | — | — |
| 3.11 | active | — | — | — |
| 3.12 | active | — | — | — |
Root Cause
pip installed the console script into a user-level bin directory that is not included in the shell's PATH.
generic中文
pip 将控制台脚本安装到了用户级 bin 目录,而该目录未包含在 shell 的 PATH 中。
Workarounds
-
95% success
echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.bashrc && source ~/.bashrc
-
90% success
python -m venv .venv && source .venv/bin/activate && pip install somecli
Dead Ends
Common approaches that don't work:
-
80% fail
Installs to system paths and can break the user environment; also creates root-owned files.
-
95% fail
Path configuration is unrelated to reinstall behavior.
-
60% fail
Only works if the package exposes a `__main__` module; many CLI packages do not.