[英]Visual Studio Code not activating the selected python interpreter for jupyter notebook
My conda environments all show up in the select interpreter path.我的 conda 环境都显示在 select 解释器路径中。 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.当我 select conda 环境 (
Python 3.7.7 64-bit ('adv_ml':conda)
) 时,我想要并导航到 vscode 中现有的 jupyter notebook。 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.我注意到尽管 kernel 和 python 解释器都说
Python 3.7.7 64-bit ('adv_ml':conda)
被选中,但不同的 conda env (conda env B) 处于活动状态。
Additionally, the.vscode settings.json in my project has the correct conda env此外,我项目中的 .vscode settings.json 具有正确的 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)
.现在这是关键……如果我创建一个新的 jupyter notebook,当我检查它使用的是什么 conda env 时,它使用的是正确的 conda 环境
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?是否有我缺少的设置导致我的 vscode 中现有的 jupyter notebooks 绑定到其他环境? 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.
我应该能够使用所选环境编辑现有笔记本。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.