简体   繁体   English

如何为Jupyter Notebook选择Anaconda环境?

[英]How to select anaconda environment for jupyter notebook?

Starting notebook from under environment does not help: 从环境下启动笔记本电脑无济于事:

(py35) dims@calculon:~/Design/RAD$ jupyter notebook
[I 19:50:24.226 NotebookApp] JupyterLab alpha preview extension loaded from /opt/anaconda3/lib/python3.5/site-packages/jupyterlab
JupyterLab v0.27.0
Known labextensions:
[I 19:50:24.227 NotebookApp] Running the core application with no additional extensions or settings
[I 19:50:24.229 NotebookApp] Serving notebooks from local directory: /home/dims/Design/RAD
[I 19:50:24.229 NotebookApp] 0 active kernels
[I 19:50:24.229 NotebookApp] The Jupyter Notebook is running at:

gives

在此处输入图片说明

while

(py35) dims@calculon:~/Design/RAD$ python
Python 3.5.4 |Anaconda, Inc.| (default, Oct 13 2017, 11:22:58)
[GCC 7.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import treelib
>>>

Ie treelib package is not available under jupyter notebook, while it is available under py35 environment. treelib软件包在jupyter笔记本下不可用,而在py35环境下py35

How to fix? 怎么修?

from terminal or cmd do the following: 从终端或cmd执行以下操作:

conda install nb_conda

That will make the conda kernel available from jupyter notebook. 这将使judater Notebook可以使用conda内核。 You will have to exit jupyter and start it again. 您将必须退出jupyter并重新启动。 All other conda environments are now available from jupyter nootebook too. 现在,jupyter nootebook也可以使用所有其他conda环境。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM