欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页

jupyter notebook kernel error

程序员文章站 2022-05-29 09:10:20
...

1. 先运行下行⬇️代码,看电脑中的kernel路径,

jupyter kernelspec list

比如:

python2       /usr/local/share/jupyter/kernels/python2
pytorch37     /usr/local/share/jupyter/kernels/pytorch37
pytorch3_6    /usr/local/share/jupyter/kernels/pytorch3_6

2. 运行下行代码,删掉不用的kernel

比如:

rm -r /usr/local/share/jupyter/kernels/python2

按以上方式删掉其他不用的kernel。

3. 安装正确的kernel

python -m ipykernel install --user

参考:https://github.com/jupyter/notebook/issues/2301