[Tutor] using sudo pip install

Random832 random832 at fastmail.com
Thu Apr 20 16:54:31 EDT 2017


On Thu, Apr 20, 2017, at 15:48, Mats Wichmann wrote:
> On 04/20/2017 01:24 PM, bruce wrote:
> > Hey guys..
> > 
> > Wanted to get thoughts?
> > 
> > On an IRC chat.. someone stated emphatically...
> > 
> > Never do a "sudo pip install --upgrade..."
> > 
> > The claim was that it could cause issues, enought to seriously
> > (possibly) damage the OS..
> > 
> > So, is this true??
> 
> It wouldn't be recommended... if your Python is packaged by your
> distribution, you really shouldn't mess with the parts that come with
> those packages.  The odds of breaking anything badly are probably low
> (especially if what you're upgrading are the typical two - pip and
> distutils), but still..

My mental model of pip had always been that it would maintain a parallel
site-packages directory in /usr/local, rather than messing with anything
in /usr (which belongs to the distribution packaging system). That's
certainly where any *newly*-installed packages seem to end up. Even
learning in general why using pip as root is a bad idea, I had still
thought this was the case. Why isn't it?


More information about the Tutor mailing list