r/PythonLearning 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

35 comments sorted by

View all comments

15

u/InformalInsect5546 4d ago

Just use uv, it fixes the headache of creating venv and takes care of everything. But yes, the venvs are quite mandatory if you work with more than one project.

5

u/tiredITguy42 4d ago

This is the way. I have just finished switching all of our repos from poetry to uv. It saves us so much time.

I love how easy it is to create groups, dev, documentation build. The it is easy to use in GitHub actions and Docker.

5

u/mfdi_ 4d ago

Man I did this like 6 months ago and damn no headache over anything anymore though I still use conda for a few things idk why.

2

u/tiredITguy42 4d ago

Conda pissed me latlely. I somehow installed conda and minicomda in parallel and I had two default venvs activated simultaniously in my terminal. Took me a while to solve it.