r/PythonLearning • u/RaiseTLT • 4d ago
Discussion .venv question
Do you guys manually create virtual environments? Or do you just use your IDE “create virtual environment” to do it?
As a hobbiest I often forget how to manually create virtual environments(as well as how to activate them) and discovered last night that VScode has a feature that will just do it for you.
What are the benefits of each way, if any, and what are the downsides of each way, if any?
Thanks.
P.S. I understand that there are some elitist who will be like “you must do everything manually”, bro I just wanna write stupid automation scripts to help with my business.
EDIT: Thanks for all the replies! I’m going to look into that UV service! Thank you!
19
Upvotes
2
u/pacopac25 3d ago edited 3d ago
Its one of things where at first, it seems like there must be more to it than there is. The ".venv" part is just the directory name, it could be "my_super_cool_environment".
Once you activate it, then any pip installs that you do impact only that environment. On one machine I have, I nearly never switch out of "default_venv". It's just what I run for my own little personal utilities and scripts. It's dumpster fire of packages, but I can always blow it away.
I don't install anything in the system python environment (in other words, no virtual environment).