在Jupyter Notebook中选择特定的虚拟环境

为你的虚拟环境安装ipykernel包,比如我之前创建了一个名为tensorflow的虚拟环境,则:

conda install -n tensorflow ipykernel

激活这个环境:

activate tensorflow

然后输入:

python -m ipykernel install --user --name tensorflow --display-name tf

上面tf是在Jupyter中显示的名称。

这样就可以在Jupyter Notebook中使用tensorflow这个虚拟环境了:

猜你喜欢

转载自blog.csdn.net/liminwang0311/article/details/86565111