Jupyter Notebook doesn't show new environments

你说的曾经没有我的故事 提交于 2019-12-06 15:08:05

问题


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).

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

How can I use this environment by jupyter ?


回答1:


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

  1. Inside your virtual environment:

    pip install ipykernel

  2. Then run the kernel "self-install" script:

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

Now, your new kernel has been installed.

See: pythonanywhere




回答2:


You can install nb_conda and it will give you Conda environment and package access extension from within Jupyter. Inside your env you can use this command:

conda install nb_conda


来源:https://stackoverflow.com/questions/43311844/jupyter-notebook-doesnt-show-new-environments

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!