[Distutils] The future of invoking pip

Glyph Lefkowitz glyph at twistedmatrix.com
Thu Nov 5 22:52:52 EST 2015


> On Nov 5, 2015, at 6:36 PM, Donald Stufft <donald at stufft.io> wrote:
> 
> I’m not really sure what the right answer is for something where the particular version of Python you’re invoking it with (and that you’re actually using Python) is important. python -m makes a lot of sense in that area because it eliminates the need to have each tool create their own logic for determining what python they are operating on but I think most people are not going to be very familiar with the idea and I don’t know how well they’d warm to it. The other option (that I can come up with) is baking that logic into each tool (as pip and virtualenv do now) either via naming scheme or a flag.

Rather than trying to figure out what the "right" way for users to invoke `pip´ to begin with is, why not just have Pip start providing more information about potential problems when you invoke it?

If you invoke 'pip[X.Y]' and it matches 'python -m pip' in your current virtualenv, don't say anything; similarly if you invoke 'python -m pip' and 'which pip' matches.  But if there's a mismatch, pip can print information in both cases.  This would go a long way to alleviating the confusion that occurs when users back themselves into one of these corners, and would alert users to potential issues before they become a problem; right now you have to be a dogged investigative journalist to figure out why pip is doing the wrong thing in some cases.

-glyph

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/distutils-sig/attachments/20151105/5722b272/attachment.html>


More information about the Distutils-SIG mailing list