Open ghost opened 6 years ago
Do you mean sudo pip install requirements.txt --user
(as root)?
No this should never be run. See https://stackoverflow.com/questions/21055859/what-are-the-risks-of-running-sudo-pip
Thanks @taohansen, It seems to be the case that I need some ramp-up on this issue because I obviously do not understand pip yet.
I thought that pip install
(as a user) installs packages in the user context and not on the OS level because the user doesn't have write permissions on OS level.
Now there is this "user scheme" method I was not aware of and I am a bit confused. python3 -m pip install --user
does install packages in the user context. But what is python3 -m pip install
(without --user
) doing differently? I could not find a web page that explained me the difference so far. Do you have an URL or a brief explanation so that I understand my wrong assumptions?
Sorry for my lack of knowledge and thanks very much!
I must admit I am not a Python programmer and only ever make use of pip
as a user. But to answer your first question, I believe that only with `pip install [pkg] --user" does a package install scope itself to only the user directory.
A
pip install requirements.txt
runs into permission issues as a non-root user. Sincesudo pip
should never be invoked,pip install requirements.txt
should readpip install requirements.txt --user
.