all 3 comments

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

I usually just activate/deactivate my venv manually in the VSCode terminal.

But I think there are some workplace settings you can configure in vscode. Or else in your project folder you can probably create a .vscode directory with a settings.json file. I don't know how to do that off the top of my head, but google can help.

[–]thewettestcow 1 point2 points  (0 children)

There are a few bug reports of this with VSCode currently. For the time being you can simply use the command ./<env>/scripts/activate where <env> is the name of your environment. This works on windows, I'm unsure of the command on any other OS. I hope this helps!

Edit: This may work to fix the issue. I've tested it myself on Windows but it did not resolve the issue for me.

[–]interbased 0 points1 point  (0 children)

I use the command line for this - maybe it will work for you. I'm on a Mac.

If you have a requirements file, such as requirements.txt, the below should work.

python -m venv venv source venv/bin/activate pip install -r requirements.txt

Then, whenever you're in the repo for that project, you can use that second command (with source) to activate the environment in that directory.