notebook python内核_Jupyter notebook连接不上 python内核

刚刚试图在jupyter notebook中运行代码,但是一直连接不上,后来检查发现jupyter 和ipython的版本不匹配。一直报错prompt-toolkit的

ERROR: jupyter-console 6.0.0 has requirement prompt-toolkit<2.1.0,>=2.0.0, but you'll have prompt-toolkit 1.0.15 which is incompatible.

ERROR: ipython 7.4.0 has requirement prompt-toolkit<2.1.0,>=2.0.0, but you'll have prompt-toolkit 1.0.15 which is incompatible.

报错

解决办法:更新prompt-toolkit的版本,具体操作为:

pip uninstall prompt-toolkit

pip install --upgrade prompt-toolkit==2.0.4 -i https://pypi.douban.com/simple

其中:prompt-toolkit的版本根据提示进行选择就可以。

你可能感兴趣的:(notebook,python内核)