It's not exactly wrong, it might not do what you are expecting.
People might run pip install requests and fail because of permissions. They might try sudo pip instead of pip install --user.
Sudo pip will install things in the system's python, rather than the user's python.
The reason I say you should "never" use sudo pip is, on any system maintained by a dedicated package manager, it can easily conflict with the system-maintained packages, which can make a real mess, especially where dependencies are concerned.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
It's not exactly wrong, it might not do what you are expecting.
People might run pip install requests and fail because of permissions. They might try sudo pip instead of pip install --user.
Sudo pip will install things in the system's python, rather than the user's python.
Ah! That makes sense. So it would be much better then to do
pip install --user
than sudo?Yes, or if you want a ditectory/project dependencies, use a virtual environment
Good explanation, @jcsvveiga .
The reason I say you should "never" use
sudo pip
is, on any system maintained by a dedicated package manager, it can easily conflict with the system-maintained packages, which can make a real mess, especially where dependencies are concerned.