Use python -m pip instead of plain pip

28 views
Skip to first unread message

Thomas Passin

unread,
Oct 23, 2023, 8:55:27 AM10/23/23
to leo-editor
In many places, I (and others) keep saying you should invoke pip using

python -m pip

instead of plain 

pip

Here is a page that goes into it in more detail.  It also turns out that python -m pip is needed to update pip itself, which I didn't know.

Edward K. Ream

unread,
Oct 23, 2023, 9:21:36 AM10/23/23
to leo-e...@googlegroups.com
On Mon, Oct 23, 2023 at 7:55 AM Thomas Passin <tbp1...@gmail.com> wrote:
In many places, I (and others) keep saying you should invoke pip using

python -m pip

instead of plain 

pip

Here is a page that goes into it in more detail.  It also turns out that python -m pip is needed to update pip itself, which I didn't know.

Neither did I.

Happily, when I do pip in a console I am really executing pip.cmd and that contains python -m pip %*

Whew! :-)

Edward
Reply all
Reply to author
Forward
0 new messages