r/Python • • Dec 18 '18

Python Virtual Environments: Extreme Advertising Edition

Post image
2.1k Upvotes

287 comments sorted by

View all comments

Show parent comments

2

u/SirBastian Dec 18 '18

1

u/[deleted] Dec 18 '18

I consider starting a new shell wronger than everything listed in that post.

1

u/SirBastian Dec 18 '18

Why? How is that a cost?

You're gaining: agnosticism to shell syntax, no need to deactivate, non-messing with your PS1 prompt (which is intended to be set in an .rc file), and most importantly, no janky "remember how the environment was and reset it to that when you're done" model, which is fragile and susceptible to breakage. Ever activated a virtualenv and then activated a conda environment on top of it by accident? Shit's weird.

2

u/[deleted] Dec 19 '18 edited Dec 19 '18

You assume that I need to run 117 different shells. I don't. I use bash, and are happy with that. Also, I like to have my shell history intact when entering an environment. The cognitive load of deactivate is in practice less than the cognitive load of remembering how many layers of shells are behind the present one. And for those two times a year where it should matter, a discardable shell is but a C-a c away.

Edit: No, I've never used conda. I consider it a Windows tool that mimics a Linux distro manager, and as such have no use for it.

→ More replies (2)