When opening a new terminal in vscode, if I have
"python.terminal.activateEnvironment": true
and I already selected a Python interpreter (see related question here and documentation here), then the terminal opens and automatically activates the environment using
source /path/to/the/environment/bin/activate /path/to/the/environment
I can turn this behavior off by setting python.terminal.activateEnvironment
to false.
Of course, I can also manually activate the environment using
conda activate /path/to/the/environment
How to get vscode to use conda activate
automatically instead of source activate
?
Using source
as vscode does sets the activated environment as the "base", e.g. if I do conda env list
I will see something like:
conda env list
# conda environments:
#
/path/to/the/actual/base/environment
base * /path/to/the/environment
and this causes some issues. For example, if I try to use mamba
which I have in my "true" base environment but not in the other one, it will cause a "No such file or directory" error.