[Python-ideas] Things I wish Pip learned from Npm

Donald Stufft donald at stufft.io
Thu May 8 17:16:08 CEST 2014


On May 8, 2014, at 11:04 AM, Philipp A. <flying-sheep at web.de> wrote:

> 2014-05-07 22:48 GMT+02:00 M.-A. Lemburg <mal at egenix.com>:
> 
> 
> 
> Please note that you should probably post this to the pip mailing
> list and/or the distutils list.
> 
> python-ideas is about ideas for Python itself and even though Python 3.4
> includes bootstrap code to install pip, pip itself is not developed by
> the Python Core Devs.
> 
> 
> There’s one point that’s relevant and worth discussing here, I quote:
> 
> 
> 
> pip’s choice of defaulting to a global installation is wrong
> 
> 
> Yes. Python’s pip bootstrapping is there in order to guarantee that all the “ just type pip install foobar” tutorials work.
> 
> Linux distributions like Arch, Debian and Ubuntu deliberately broke this guarantee, and for good reasons:
> 
> Pip per default installs globally, which should be the system package manager’s territory.
> 
> 

This isn’t exactly accurate. Linux distributions aren’t installing pip globally using ensurepip, which is an entirely different thing than pip. We never expected Linux distros *to* use ensurepip for that purpose. If you install python-pip on any of these distros you still get a version of pip that installs things globally. Some distros (Fedora I believe) are making Python depend on pip so the outcome is exactly the same.
> It would be best if pip would work like this if you run it without some -g, --global switch outside a venv:
> 
> 

I don’t think pip will ever require a virtual environment by default. However there is an open ticket to make —user installs the default when running as non root.
> On Linux: “You’re on linux, please use your package manager for global installation or use a virtual environment. Use the -g switch to force global installation”
> 
> On Windows and OSX: “Please use the -g switch for installations outside of virtual environments”
> 
> Is it to late to change this? I really want the guarantee and pip to work. But I also totally understand why all those distributions break it!
> 
> 

Like I said above, no distribution currently breaks pip, a few have a broken ensurepip but that is being fixed.

> _______________________________________________
> Python-ideas mailing list
> Python-ideas at python.org
> https://mail.python.org/mailman/listinfo/python-ideas
> Code of Conduct: http://python.org/psf/codeofconduct/




-----------------
Donald Stufft
PGP: 0x6E3CBCE93372DCFA // 7C6B 7C5D 5E2B 6356 A926 F04F 6E3C BCE9 3372 DCFA

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20140508/d9d15b69/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 801 bytes
Desc: Message signed with OpenPGP using GPGMail
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20140508/d9d15b69/attachment-0001.sig>


More information about the Python-ideas mailing list