问题描述
由于应用程序报告的内容不同,我试图找出我的Mac上的anaconda内核在哪里.
I am trying to figure out where are my anaconda kernels in my mac, since applications report different things.
如果我跑步:
我得到:
但是,当我打开Jupiter笔记本时,我可以看到并使用:
However, when I open Jupiter notebook, I can see and use:
以下是一些屏幕截图:
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中查找和删除隐藏的内核的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!