创建一个新env, 如 tensorflow_env
(base)$ conda create -n tensorflow_env python=3.8
激活新env:
(base)$ conda activate tensorflow_env
安装 ipykernel
(tensorflow_env)$ conda install ipykernel
然后安装一个新jupyter kernel, 如 tensorflow_env:
(tensorflow_env)$ ipython kernel install --user --name=tensorflow_env
退出 env:
(tensorflow_env)$ conda deactivate
打开 jupyter lab:
(base)$ jupyter lab
在工作页面, 选择kernel: tensorflow_env.
image.png
移除 kernel:
(base)$ jupyter kernelspec list
(base)$ jupyter kernelspec uninstall tensorflow_env
删除一个env:
(base)$ conda env remove --name tensorflow_env