jupyter notebook kernel error

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

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章