Search code examples
pythonpython-3.xpip

What is the effect of using `python -m pip` instead of just `pip`?


When I use python -m pip install <package>, how is that different from using just pip install <package>? Similarly, why would I write python -m pip install --upgrade pip to upgrade Pip, instead of just pip install --upgrade pip?


Solution

  • If you type python --help

    You get

    // More flags above
    -m mod : run library module as a script (terminates option list)
    // and more flags below
    

    A great many things in a terminal will show you how to use it if you either use command --help or man command