[Distutils] The future of invoking pip

Nathaniel Smith njs at pobox.com
Mon Nov 9 20:12:57 EST 2015

On Sun, Nov 8, 2015 at 8:01 AM, Ionel Cristian Mărieș
<contact at ionelmc.ro> wrote:
> On Sat, Nov 7, 2015 at 12:24 AM, Donald Stufft <donald at stufft.io> wrote:
>> Well, it’s not really a launcher no, but you’d do ``pip -p python2 install
>> foo`` or something like that. It’s the same UI. Having just a “launcher” I
>> think is actually more confusing (and we already had that in the past with
>> -E and removed it because it was confusing). Since you’ll have different
>> versions of pip in different environments (Python or virtual) things break
>> or act confusingly.
> That can't be worse than the current situation. And I'm not asking to bring
> `-E` back.
> The idea is that the pip bin becomes a launcher file, just like py.exe - it
> would just try to discover an appropiate python and run `-mpip` with it.
> This doesn't even need
> to be implemented in pip - linux distributions can do this.

I think it's fair to raise an eyebrow at this, though -- basically the
problem is that pip has a really unusual argument passing convention,
which is that it expects to receive the path to the target python in
sys.executable. So instead of fixing this weird argument passing
convention, we're setting up a shim to take the UI we actually want
("discover an appropriate python"), and converting it to the weird
argument passing convention.

Maybe it's the best approach given the weight of history and so forth,
but we can at least acknowledge that it's pretty weird!

Nathaniel J. Smith -- http://vorpus.org

More information about the Distutils-SIG mailing list