python - 如何从 jupyter 笔记本中删除停用的 conda 环境名称?

标签 python jupyter-notebook conda miniconda

我在我的 macbook 中创建了多个 miniconda 环境。但是当我打开 jupyter notebook 时,它显示我很久以前创建的不存在的 conda 环境,并且在 conda 环境中不再可用。

如何从 jupyter notebook 中删除这些不存在的环境名称?

我当前的 conda 列表

enter image description here

Jupyter 展示了什么

(注意:例如,Jupyter notebook 显示的环境“xx”不在 conda env 列表中)

enter image description here

如何移除不存在的环境

当我打开 jupyter notebook 时,如何删除不存在的环境,例如“xx”?

最佳答案

这取决于你如何注册内核,但我怀疑你使用了 python -m ipykernel install --user。在这种情况下,您应该能够获得内核注册位置的列表

jupyter kernelspec list

您可以简单地删除与您要删除的内核相对应的文件夹。

值得注意的是,使用 nb_conda_kernels使用 ipykernel 自动注册所有 Conda env 会在您删除其环境或从环境中删除 ipykernel 时自动删除内核。

关于python - 如何从 jupyter 笔记本中删除停用的 conda 环境名称?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/64176715/

相关文章:

python - python /畅达/ python /Windows : how to start and activate a conda environment?

python - 在 Python Pandas 中搜索数据框中的项目并将列转置为行

python - 是否有内置方法从 Python 的所有基类中获取所有 __annotations__?

python - 使用 jupyter-cadquery 嵌入小部件 ( Threejs ) : wrong position on load

python - conda 可以安装源代码发行版吗?

environment-variables - 通过重命名文件夹方法轻松更改Conda环境(在Win7 64中)?可以接受吗?

python - 如何获取 matplotlib 箱线图的箱线图数据

python - 如何使用 SQLAlchemy + PostgreSQL 删除自定义类型?

python - Jupyter笔记本: Access to the file was denied

amazon-web-services - 使用新的 docker 镜像升级 JupyterHub helm 版本,但正在使用旧镜像?