[Distutils] [final version?] PEP 513 - A Platform Tag for Portable Linux Built Distributions

Glyph Lefkowitz glyph at twistedmatrix.com
Wed Feb 17 07:16:06 EST 2016


> On Feb 17, 2016, at 12:55 AM, Antoine Pitrou <solipsis at pitrou.net> wrote:
> 
> On Tue, 16 Feb 2016 16:10:34 -0800
> Glyph Lefkowitz <glyph at twistedmatrix.com> wrote:
>> 
>> I am 100% on board with telling people "don't use `sudo pip install´".  Frankly I have been telling the pip developers to just break this for years (see https://pip2014.com, which, much to my chagrin, still exists); `sudo pip install´ should just exit immediately with an error; to the extent that packagers need it, the only invocation that should work should be `sudo pip install --i-am-building-an-operating-system´.
> 
> [...] The problem is not the use of "sudo" or the
> invocation under root, it's to install into a system Python. So the
> solution should be to flag the system Python as not suitable for using
> pip into, not to forbid using pip under root.


I didn't mean to suggest that sudo /path/to/venv/bin/pip install should fail, so we are in agreement here.  The exact details of how pip detects the suitability of a given environment are up for discussion, it's just that the default behavior of `sudo pip install´ (install into package-manager-managed system prefix) is a bad idea.  Perhaps certain venvs should set this flag as well, to indicate that pip should not mess with it any more either.

-glyph


More information about the Distutils-SIG mailing list