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

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