在Jupyter Notebook中查找和删除隐藏的内核 [英] locating and removing hidden kernels in jupyter notebook

查看:526
本文介绍了在Jupyter Notebook中查找和删除隐藏的内核的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

由于应用程序报告的内容不同,我试图找出我的Mac上的anaconda内核在哪里.

I am trying to figure out where are my anaconda kernels in my mac, since applications report different things.

如果我跑步:

jupyter kernelspec列表

jupyter kernelspec list

我得到:

可用的内核:python2
/Users/user/anaconda/share/jupyter/kernels/python2

Available kernels: python2
/Users/user/anaconda/share/jupyter/kernels/python2

但是,当我打开Jupiter笔记本时,我可以看到并使用:

However, when I open Jupiter notebook, I can see and use:

[I 07:47:21.394 NotebookApp] [nb_conda_kernels]已启用,4个内核 找到

[I 07:47:21.394 NotebookApp] [nb_conda_kernels] enabled, 4 kernels found

以下是一些屏幕截图:

Here are some screenshots:

如何删除所有这些env,仅保留conda根? 谢谢

How can I remove all of those envs and leave only conda root? Thanks

推荐答案

您正在使用 nb_conda_kernels 软件包,它动态将来自其他conda环境的ipython内核添加到Jupyter.这些内核的内核规范未使用Jupyter安装在环境中,这就是为什么在jupyter kernelspec list中看不到它们的原因.

You are using nb_conda_kernels package, which dynamically adds ipython kernels from other conda environments to Jupyter. Kernel specs for those kernels are not installed in the environment with Jupyter, that's why you don't see them with jupyter kernelspec list.

我猜您是从基本(根)环境运行命令的,因此列出的内核应对应于菜单中的Python [conda root]Python [default]选项.

I can guess you run the command from the base (root) environment, thus the listed kernel should correspond to the Python [conda root] and Python [default] options in the menu.

另外两个内核位于"anaconda"环境中.如果在运行jupyter kernelspec list之前将其激活,则会看到内核的位置:

Two other kernels are located in the 'anaconda' environment. If you activate it before running jupyter kernelspec list you will see the kernels' location:

source activate anaconda
jupyter kernelspec list

如果您不想将来自其他conda环境的内核动态添加到Jupyter,请从安装Jupyter的环境中删除"nb_conda_kernels"软件包.

If you don't want to dynamically add kernels from other conda environments to Jupyter, remove the 'nb_conda_kernels' package from the environment where Jupyter is installed.

这篇关于在Jupyter Notebook中查找和删除隐藏的内核的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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