如何在Jupyter Notebook中选择您的conda环境 [英] How to choose your conda environment in Jupyter Notebook
问题描述
我使用Python 3.7(根环境)安装了Anaconda 5.3.
之后,我使用Python 3.6创建了一个新环境(py36)
I installed Anaconda 5.3 with Python 3.7 (root environment).
After that I created a new environment (py36) using Python 3.6
我通过 activate py36
激活了新环境 conda env list
显示该环境处于活动状态.
I activated the new environment with activate py36
conda env list
shows that the environement is active.
但是,当我启动Jupyter Notebook时(从带有 jupyter notebook
的Anaconda提示符下),似乎使用的是根环境,而不是激活的环境.
But when I start Jupyter Notebook (from the Anaconda prompt with jupyter notebook
), it seems to use the root environemt, not the activated environment.
如何在新的创建环境(py36)中使用Jupyter Notebook?
How can I use Jupyter Notebook with the new create environment (py36)?
推荐答案
正如 @Ista 所述,文档提供了一个使用笔记本扩展程序的简单解决方案.
As @Ista mentioned, the documentation gives an easy solution using notebook extensions.
conda安装nb_conda
安装后,您可以在Jupyter Notebook中选择从Jupyter Notebook的内核"菜单中更改内核".
After installing, you have the option in Jupyter Notebook to 'Change kernel' from the 'Kernel' menu in your Jupyter Notebook.
这篇关于如何在Jupyter Notebook中选择您的conda环境的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!