Problem
I am new to VSCode so I was trying to use the existing conda environments as part of my project in VSCode. I was able to use Shift+Cmd+P
to select the relevant interpreter
(in this case named
mlops
, as visible at the bottom right of the image below)
I was able to test that after selecting the interpreter, my code was actually using this, as displayed in the left side terminal window using the code below -
import sys
print("Interpreter:")
print(sys.executable)
Finally, I then went to another bash terminal (right side) and activated the conda environment. But, when I checked which python
it still points to the wrong interpreter.
Attempts
I have gone through a large number of questions and solutions to solve this issue and most of them point to adding terminal.integrated.inheritEnv
as False
in the settings.json
But it doesn't seem to fix the issue.
My question is 2 fold:
- Why is this happening and is this only a mac/Linux issue?
- How do I fix this, in general, for my current and future projects?