[Tutor] using sudo pip install

Mats Wichmann mats at wichmann.us
Thu Apr 20 15:48:22 EDT 2017


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..

But there's an easy workaround if you want to experiment with newer
stuff, as well as isolate one set of installs from another so they don't
end up fighting over conflicting versions (foo wants bar 13.0 while baz
wants bar 14.0): use virtual environments.  You can safely install and
upgrade whatever you want into a virtualenv, because it's an isolated
location; if it messes up, you can just remove the whole thing and
there's no harm done.




More information about the Tutor mailing list