There's a much easier way…

If you instead create the new Conda environment from inside your projects root folder using the VSCode terminal, all this is set up for you automatically.

As soon as VSCode detects that it exists a virtual environment it will pop up a question asking if you want to configure this environment for this project.

This is obviously advantageous over having to swap between environments manually, because it gets saved in the configuration, so next time you open the same project it knows which virtual environment it should activate.

This works the same with either the now built-in `venv`command or virtualenv, virtualenvwrapper etc.

Senior Software Developer. Hard-Core Learning Addict.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store