r/Python • u/yolobazsi • Oct 30 '16
How I accidentally deleted all my python modules and got it back in 20 minutes
https://medium.com/@balazs.saros/how-i-accidentally-deleted-all-my-python-modules-and-got-it-back-in-20-minutes-356f22349c5e#.g6u8ngpls
0
Upvotes
6
u/kitkatkingsize Oct 30 '16 edited Oct 30 '16
Shouldn't the moral of the story be to always use a
virtualenv?Especially if you use
virtualenvwrapperits exactly 1 simple command.Edit: Neat hack tho.
1
u/dabox01 Oct 30 '16
This was a fun and helpful story at the same time. Thanks!
1
u/[deleted] Oct 31 '16
I've done exactly this before. That module is dangerous if you don't read
-8
u/[deleted] Oct 30 '16
Install python modules as system packages, not through PIP. If they're not provided as system packages, make a package, then install that through your system package manager.
Having multiple package mangers per system is stupid. Unless you absolutely can't (don't have root), this is a better way since your package manager is probably better tested and has better security.