In most of the Linux distros, the system components depend on python. However, it is quite easy to accidentally execute python
or pip
commands in the shell, potentially causing issues with the system's Python environment.
I have created a script that utilizes ALIAS COMMANDS TO CUSTOM FUNCTIONS. This script prevents developers from running system Python and pip in the shell.
- download this repo and copy
no_sys_py.sh
to somewhere - source this file in the last line of your .bashrc or .zshrc file
> pip install xxx
You are not allowed to run system pip!
- If you have any
pip
orpython
alias, you'd better modify this script to support your alias. - fish shell is not supported.