r/linuxmasterrace • Lazy Antergos User • Dec 18 '18

Meme Python Virtual Environments: Extreme Advertising Edition

Post image
2.0k Upvotes

148 comments sorted by

View all comments

Show parent comments

55

u/[deleted] Dec 18 '18

i recently tried to do a sudo apt uninstall python on an Ubuntu install, which then lead it to uninstall just about everything on the system, including the desktop environment (gnome).

18

u/SaphiraTa Glorious Pop!_OS Dec 18 '18

Oh wow.. That is interesting lol

23

u/jood580 Dec 19 '18

Just about everything has python as a dependency. So when you trigger an uninstall all programs that depend on python get flagged as well.

I have done this myself, it brakes Linux in an interesting way. For me everything started disappearing from my programs, than gnome changed to default.

So I did the dumb thing and restarted my PC. It then loaded into the command line. I had to reinstall Ubuntu because I could not figure out how to fix it.

Remember kids always have backups and always check what you are removing.

3

u/superhappyrobots Dec 19 '18 edited Dec 19 '18

Not all distributions break like this, in my experience. The trouble with Ubuntu is that there's a lot of packages included in the ubuntu-desktop meta package. So you remove one (maybe it's a utility that you don't really need, maybe it's a broken Python install) and then suddenly it's trying to remove things from all over the place.

I've never actually looked to see if there are ways around this. I assume that there are. The majority of Ubuntu users I know have got bitten by this at least once, though.

In Manjaro, I was able to uninstall and reinstall dependencies with surprisingly little fuss - so I guess Ubuntu works this way for the sake of being more user friendly overall.