On the internet, I saw them almost as interchangeable even if someone says that the latter is safer. What are the difference and which one should be used in which cases?
Asked
Active
Viewed 76 times
0
-
`python -m` runs the library module as its own script (do `python --help` to see arguments and their explanations). As to their difference, I don't think there is one fundamentally – Max Jul 20 '18 at 14:39
-
Pip is just calling python -m pip... the reason its safer to just call python -m pip, is that you know for sure which python will get the install... where if you have multiple python installed who knows which one just pip installs to – Joran Beasley Jul 20 '18 at 14:39
-
@JoranBeasley Isn't there are a difference in pip from `pip` and `pip3` for this already? – Max Jul 20 '18 at 14:40
-
Yes max this is also true – Joran Beasley Jul 20 '18 at 14:41
-
@Max Maybe pip3 only refers to python3.x, you don't know to which version if you have more than one. – gvgramazio Jul 20 '18 at 15:02