r/Python • • Jul 21 '22

Resource Why you should use `python -m pip`

https://snarky.ca/why-you-should-use-python-m-pip/
0 Upvotes

16 comments sorted by

View all comments

2

u/ZachVorhies Jul 21 '22 edited Jul 21 '22

For those that don’t want to read the whole article this is the gist:

pip may be not point to the same command as python -m pip

This happens in windows and mac quite often. You’ll experience this as finding that pip install <package> won’t work for you. But python -m install <package> will.

If you are using virtual environments then this isn’t a problem, pip and python -m pip will point to the same command

1

u/Bangoga Jul 21 '22

So essentially "if you haven't set up pip on your windows, just use python -m pip instead"

Or just set up pip

1

u/ZachVorhies Jul 21 '22

or use a virtual environment. If using global python always use python -m pip <Package>

-1

u/Bangoga Jul 21 '22

I buy a new computer for every new project