My conda environments all show up in the select interpreter path. When I select the conda environment (Python 3.7.7 64-bit ('adv_ml':conda)
) I want and navigate to an existing jupyter notebook in vscode. I noticed that a different conda env (conda env B) is active despite both the kernel and python interpreter saying Python 3.7.7 64-bit ('adv_ml':conda)
is selected.
Additionally, the .vscode settings.json in my project has the correct conda env
{
"python.pythonPath": "/Users/me/anaconda3/envs/adv_ml/bin/python",
"jupyter.jupyterServerType": "local"
}
Now here is the kicker... if I create a new jupyter notebook, when I check what conda env it is using it is using the correct conda environment Python 3.7.7 64-bit ('adv_ml':conda)
.
Is there a setting I am missing that is causing existing jupyter notebooks in my vscode to be tied to this other environment? Additionally, I didn't create these other notebooks so it's not like they have this incorrect environment to begin with. I should be able to edit existing notebooks with the selected environment.
question from:
https://stackoverflow.com/questions/65931126/visual-studio-code-not-activating-the-selected-python-interpreter-for-jupyter-no 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…