skip to Main Content

I am using a conda and venv python environment for developement in visual studio code on windows 10.

When I switch between environements, the programs run fine but in the terminal the changes are not reflected unless I create a new terminal. Is this intended or a bug? Is it possible to automate the switching of the environements in the terminal

2

Answers


  1. When you switch the interpreter, the pyhton extension will use the new interpreter to run the code, and the interpreter version will be displayed in the lower right corner of the interface.

    The problem you may encounter is that the terminal does not change after switching the interpreter, but the code actually executed uses the newly selected interpreter.

    enter image description here

    Login or Signup to reply.
  2. This is a feature in VS Code. You were in environment A, so then you switch to environment B, and that becomes the new environment from then on. As for the automation I am unsure. I like my environment like this, so I can have my frontend code in one terminal, and backend code in the other.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search