[Distutils] What does it mean for Python to "bundle pip"?

Nick Coghlan ncoghlan at gmail.com
Tue Aug 20 18:31:23 CEST 2013

On 20 Aug 2013 11:02, "Steve Dower" <Steve.Dower at microsoft.com> wrote:
> Brett Cannon wrote:
> > Steve Dower wrote:
> >> Oscar Benjamin wrote:
> >>> Paul wrote:
> >>>> Given that the installer includes the py.exe launcher, if you leave
> >>>> defaults, then at a command prompt "python" doesn't work. But that's
> >>>> because "py" does. And if you have multiple versions of Python
installed, you
> >>>> don't *want* python on PATH, because then you have to manage your
> >>>> bother when "py -2.7" or "py -3.3" does what you want with no path
> >>>> Once you want any *other* executables, though, you have to deal with
> >>>> (especially in the multiple Pythons case). That is a new issue, and
one that
> >>>> hasn't been thought through yet, and we don't have a good solution.
> >>>
> >>> From a user perspective I think that 'py -3.4 -m pip ...' is an
improvement as
> >>> it means I can easily install or upgrade for a particular python
installation (I
> >>> tend to have a few). There's no need to put Scripts on PATH just to
run pip. I
> >>> think this should be the recommended invocation for Windows users.
> >> Crazy idea:
> >>
> >>     py install <other args>
> >> (or 'py --install ...', but I think 'py install' is currently invalid
and could be used?)
> >>
> >> which the launcher executes identically to:
> >>
> >>     py -m pip install <other args>
> >>
> >> (Implicitly extended to other relevant commands... I'm not proposing a
complete list.)
> >>
> >> Pros:
> >> * allows implicit bootstrapping on first use (from a bundled pip, IMO,
in case no network is available)
> >
> > Nick already killed this idea. Richard's original PEP proposed this and
the idea eventually was shot down.
> Are you referring to the whole idea or just the implicit bootstrap? I
followed the discussions about the latter, and it seemed that the problem
was trying to bootstrap pip using pip.

That and potentially relying on network access at runtime, as well as
potentially running into permissions issues depending on where Python was
installed. Implicit bootstrap just seems like a recipe for hard to debug
failure modes.

> This is different (bootstrap pip from py) and I believe it does not have
the same issues.

It certainly avoids some of them, but not all.

I think Paul Moore has the right idea: treat "scripts on Windows" as a
distinct problem deserving of a separate PEP. That general solution will
then apply to pip as well. In the meantime "py -m pip" feels like a
tolerable Windows specific workaround.


> > -Brett
> _______________________________________________
> Distutils-SIG maillist  -  Distutils-SIG at python.org
> http://mail.python.org/mailman/listinfo/distutils-sig
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/distutils-sig/attachments/20130820/5bb0ff36/attachment.html>

More information about the Distutils-SIG mailing list