[Python-ideas] High time for a builtin function to manage packages (simply)?

Paul Moore p.f.moore at gmail.com
Mon Sep 7 12:57:10 CEST 2015


On 5 September 2015 at 09:30, Nick Coghlan <ncoghlan at gmail.com> wrote:
> Unfortunately, I've yet to convince the rest of PyPA (let alone the
> community at large) that telling people to call "pip" directly is *bad
> advice* (as it breaks in too many cases that beginners are going to
> encounter), so it would be helpful if folks helping beginners on
> python-list and python-tutor could provide feedback supporting that
> perspective by filing an issue against
> https://github.com/pypa/python-packaging-user-guide

I would love to see "python -m pip" (or where the launcher is
appropriate, the shorter "py -m pip") be the canonical invocation used
in all documentation, discussion and advice on running pip. The main
problems seem to be (1) "but just typing "pip" is shorter and easier
to remember", (2) "I don't understand why pip can't just be a normal
command" and sometimes (3) "isn't this just on Windows because you
can't update pip in place on Windows" (no it isn't, but it's a common
misconception of the issue).

But I would agree with Nick, and recommend that anyone advising people
on how to use pip, *especially* if you are helping them with issues,
to always use "python -m pip" as the canonical command. If you need to
explain why, say that this makes sure that you run pip from the
correct Python interpreter, that's the basic point here.

Paul


More information about the Python-ideas mailing list