r/Python • • Dec 18 '18

Python Virtual Environments: Extreme Advertising Edition

Post image
2.1k Upvotes

287 comments sorted by

View all comments

1

u/noobcola Dec 18 '18

You still have to run bin/activate these days?

6

u/ase1590 Dec 18 '18

How else should it work? People have different projects, and also people have different shells.

running activate auto chooses the proper config for the following: csh, powershell, fish shell, and bash.

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.

→ More replies (3)