Nick Coghlan added the comment:

Yeah, this is a known problem with pip where if you run it with sudo, it will 
happily uninstall system managed files from the system Python.

To fix your system (if you haven't already):

    $ sudo dnf reinstall python2-pip

(Anyone that accidentally uninstalls one of DNF's dependencies is in for a 
world of pain, but fortunately for this case pip doesn't fall into that 
category)

For the actual "pip currently happily uninstalls distro packages when run with 
sudo" problem, 
https://mail.python.org/pipermail/distutils-sig/2016-January/028080.html is the 
most recent discussion of that situation.

So we have a basic concept in place for how to make "sudo pip uninstall" less 
dangerous, it just requires coordination between PyPA updates to pip and 
downstream distro packaging policies to get us there.

----------
nosy: +encukou

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue27924>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to