【Anaconda】- Anaconda jupyter kernel 的创建与删除

创建虚拟环境

conda create -n 虚拟环境名称 python=python版本


conda create -n tensorflow python=3.6

激活环境

conda activate tensorflow

安装ipykernel模块

conda install ipykernel 

注意 : 如果只是想让jupyterlab 识别python环境 参考 :
【Anaconda】- jupyter-lab识别 anaconda虚拟环境

配置kernel

如果你想在 指定的虚拟环境下配置kernel, 就要先切换到那个环境,然后再执行下面的命令, 注意 第一个名字 tensorflow 是存放kernel配置文件的目录名,第二个是Kernel的名字

python -m ipykernel install --user --name tensorflow --display-name Tensorflow2

在这里插入图片描述
【Anaconda】- Anaconda jupyter kernel 的创建与删除_第1张图片
【Anaconda】- Anaconda jupyter kernel 的创建与删除_第2张图片

查看安装的内核和位置

jupyter kernelspec list

删除 kernel

jupyter kernelspec remove tensorflow

你可能感兴趣的:(Python学习笔记)