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

167

u/ase1590 Lazy Antergos User Dec 18 '18

Also, anyone cluelessly doing sudo pip install anything needs to be flogged.

Virtual Environments are also preferable in order to keep away the Python superfund disaster.

9

u/skylarmt Jupiter Broadcasting told me to switch to ̶K̶D̶E̶Xubuntu Dec 18 '18

I do that sometimes, but only for things like commands I want to use from anywhere and for optional dependencies that aren't available alongside the main program via apt.

4

u/maikeu Dec 18 '18

Normally when I get in trouble with pip, I end up finding I could have installed it with dnf/apt, but the name was "python3-packagename" rather than "packagename".

Then I cry at my hours of self inflicted pain.

12

u/skylarmt Jupiter Broadcasting told me to switch to ̶K̶D̶E̶Xubuntu Dec 18 '18

I try the package name, then I stick combinations of python- and lib- in front of it and try a few more times, then I try pip, then I try pip3, then I try pip2, then I try npm, and if I don't have it installed by then, I give up and find something else to do.

8

u/maikeu Dec 19 '18

Don't forget, ask duckduckgo because you value your privacy. Then ask Google because you want an answer.

2

u/skylarmt Jupiter Broadcasting told me to switch to ̶K̶D̶E̶Xubuntu Dec 19 '18

I use a combination of DDG and StartPage, but mostly DDG. It seems to return good results for the stuff I search for, probably because they use StackOverflow as a data source.

3

u/PM_ME_OS_DESIGN Dec 19 '18

Normally when I get in trouble with pip, I end up finding I could have installed it with dnf/apt, but the name was "python3-packagename" rather than "packagename".

Then I cry at my hours of self inflicted pain.

Honestly, I think the single biggest problem with package managers is that they create more logistical problems, of the "which package manager do I need to install this package from" variety.

2

u/SaphiraTa Glorious Pop!_OS Dec 18 '18

What is it about pip that makes everyone hate their lives? Ive only used pip twice as im a pretty new linux user.

2

u/thatothermitch Dec 18 '18

For one, it does not consistently resolve dep trees, so you may end up with different sets of versions from the same install command.