jupyter notebook切换kernel

文章目录

安装

确保安装了ipykernel

python3 -m pip install ipykernel
python3 -m ipykernel install --user // 默认更改python3

然后切换到目标环境,若没有先建立

conda create -n py36-test python=3.6
source activate py36-test
python -m ipykernel install --user --name=py36-test //关键
source deactivate

可以查看json文件确认是否安装正确

Installed kernelspec myenv in /home/user/.local/share/jupyter/kernels/myenv

删除

查看kernel列表

jupyter kernelspec list

删除kernel

jupyter kernelspec uninstall myenv

版权声明:本文为mohhao原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接和本声明。