Operating environment
Ubuntu 14.04 LTS Japanese Remix
After installing pip, I added sudo to pip install
when installing various packages.
However, some sources do not add sudo when pip install
.
Is it better to put on sudo or not?
I searched. http://askubuntu.com/questions/802544/is-sudo-pip-install-still-a-broken-practice
In short, in accordance with the principle of least privilege, don't use sudo with pip to install Python packages from PyPI unless you absolutely need to. Instead, consider using pip install --user (note that pip install with no sudo nor additional flags/options defaults to pip install --user on Ubuntu currently) or virtual environments (such as virtualenv). If you see people recommending sudo pip or sudo -H pip, please tell them not to.
(Addition) I read the above document and did pip install without sudo, but I encountered several situations where I couldn't install successfully. After all, I'm doing pip install with sudo.
I'm still not sure.
Recommended Posts