Jupyter Notebook没有显示新环境 [英] Jupyter Notebook doesn't show new environments

查看:201
本文介绍了Jupyter Notebook没有显示新环境的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在Windows上安装了anaconda python 2.7,最近我为python 3.5创建了一个新环境(使用conda create -n py35 python=3.5).

I have anaconda python 2.7 installed on my windows and I recently created a new environment for python 3.5 (using conda create -n py35 python=3.5).

当我activate py35并运行jupyter notebook时,它没有显示py35环境.它只有python根(py27).

When I activate py35 and run jupyter notebook, it doesn't show py35 environment. It only has python root (py27).

我如何通过jupyter使用此环境?

How can I use this environment by jupyter ?

推荐答案

要在虚拟环境中使用jupyter笔记本,必须在您的venv中安装ipykernal.

To use jupyter notebook inside a virtual environment, ipykernal is required to be installed in your venv.

  1. 在您的虚拟环境中:

  1. Inside your virtual environment:

pip install ipykernel

然后运行内核自我安装"脚本:

Then run the kernel "self-install" script:

python -m ipykernel install --user --name=my-virtualenv-name

现在,您的新内核已经安装.

Now, your new kernel has been installed.

请参阅: pythonanywhere

这篇关于Jupyter Notebook没有显示新环境的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆