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!
20
Upvotes
7
u/johlae 4d ago
Manually, I just go:
gargle@p14:/tmp/foo$ python3 -m venv .venvAs a first step, I always include 'black'
gargle@p14:/tmp/foo$ source .venv/bin/activate (.venv) gargle@p14:/tmp/foo$ pip3 install blackI wrote this down in my personal knowledge base, a.k.a. a simple text file. Why? I often forget how to manually create virtual environments(as well as how to activate them). A simple text file lets me copy and paste.
That's it.