Working in VSCode (1.86.2) on an iMac (14.3.1): I created a conda environment and selected python 3.10 as the interpreter (one of the libraries I am working with doesn’t work with anything above 3.10), then start a new terminal and I can see that the environment is activated.
I then start installing things and it switches to 3.11? What is that about? I checked with python --version
and I get Python 3.10.13
. I checked the .conda/bin and the libraries are there.
Terminal says this (/path/to/directory/Project/.conda) (.conda) (base) My-iMac:Project D$
2
Answers
please try to follow these steps:
The output should point to the Python interpreter in your conda environment.
So, just use this env created in your VSCode.
PS – If it doesn’t, you might need to adjust your PATH variable.
First of all, the kernel you choose for jupyter has nothing to do with the terminal, it doesn’t affect the terminal’s python environment.
If you choose an interpreter (virtual environment) for
.py
scripts,Ctrl+Shift+P –>
Python: Select Interpreter
then a new terminal will automatically activate the environment.