(Ubuntu)jupyter notebook運行一直顯示:kernel starting,please wait解決辦法

即使重裝後kernel也一直卡在starting,弄了好長時間
參考的了這個博客https://blog.csdn.net/weixin_46088071/article/details/103803928

python -m ipykernel install --user

到這步時依舊報錯ImportError: cannot import name 'create_prompt_application'
應該有很多朋友在安裝jupyter時出現過這個錯誤提示,代碼無法運行,服務器無法連接。
原因:prompt-toolkit版本不對。jupyter包依賴的時prompt-toolkit2.0.0以上的版本,而ipython包依賴的是1.0.15的版本,估計是裝Jupyter時,將版本更新了,所以運行的時候報錯,把版本切成1.0.15即可。
解決方法:安裝符合要求的版本。
我用的anaconda,輸入命令pip3 install --upgrade prompt-toolkit==1.0.5
重啓jupyter notebook就可以運行了,不會提示kernel starting,please wait了。

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