[Distutils] The future of invoking pip

Michael Merickel mmericke at gmail.com
Fri Nov 6 14:10:58 EST 2015


On Fri, Nov 6, 2015 at 12:33 PM, Ionel Cristian Mărieș <contact at ionelmc.ro>
wrote:

> ​Why not consider having a "pip" launcher?​ Seems the obvious thing to me
> - python has the "py" launcher on windows and it works great!
>
> Eg: "pip -3" to launch pip using python3, "pip -3.5" to launch pip using
> python3.5 - just like the "py" launcher.
>

This sounds similar to node's approach to bundling npm where you have a
version of npm that runs for all projects using that node runtime. In
effect you use the same npm binary independent of which virtualenv you are
using, it's tied to the interpreter installation. So you run the pip that
came with that python, such as pip2.7 installed with python2.7 and then
just tell it which virtualenv to install packages into. You could go
further and install a pip alias into the virtualenv that links to the
appropriate pip, but there's still only one copy running for all
virtualenvs off of that interpreter.

This model is really nice for updating because you don't need to update pip
inside every single virtualenv. Another cool feature of npm is that it's
also effectively auto-using the virtualenv since it defaults to the local
node_modules folder so you don't have to specify it as something like "pip
--virtualenv=env install".

Anyway I'm not suggesting such a drastic change but it's nice to look at
what else is out there and the benefits. It doesn't mesh particularly well
verbatim with how PYTHONPATH+virtualenv works of course.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/distutils-sig/attachments/20151106/27f63554/attachment.html>


More information about the Distutils-SIG mailing list