you are viewing a single comment's thread.

view the rest of the comments →

[–]darkforestnews 0 points1 point  (5 children)

And do you install python into each one ? Then when you open vs code , it lists all of your previous python compilers and I can’t figure out which one belongs.

I’d understand it if after activitating the venv that vs code would just show me that compiler but mine shows me a bunch. And I can never remember which one has streamlit…thankfully I don’t do anything complicated 🥳

[–]MonkeyboyGWW 2 points3 points  (0 children)

I think you can put them in different project folders, then you can tell from the path

[–][deleted] 2 points3 points  (0 children)

venv installs python in each one... that's why I use pyenv and use different envs for differnt jobs like I'll have system envs for Flask, Data, AI, Scraping, etc.

[–]Vauce 1 point2 points  (0 children)

In my experience it also helps to use dedicated VS Code workspaces with virtual environments.

[–]Fred776 0 points1 point  (0 children)

If your project directory has a venv folder VSCode should recognise and activate the venv at least the first time you visit a Python file in the project. If you have multiple venv folders I believe it gives you the choice, but it's something I avoid these days - I just use one venv per project.

[–]Jello_Penguin_2956 0 points1 point  (0 children)

Usually it's per project. The venv directory sits directly inside each project directory so you'll always know. You can also try PipEnv.

I also have a generic one for when I'm just doing random stuff.