系统: linuxmint19.3 cinnamon

jupyter_contrib_nbextens的地址:https://jupyter-contrib-nbextensions.readthedocs.io/en/latest/install.html

安装过程中遇到的问题:

"jupyter contrib nbextension install --user"时终端出现安装问题,没有管他,去开启jupyter notebook,但是jupyter不能正常使用,不得不去解决次问题,如实关闭jupyter,终端中有,如下错误提示:

Traceback (most recent call last):
  省略部分内容
  File "/usr/lib/python3/dist-packages/IPython/__init__.py", line 49, in <module>
    from .terminal.embed import embed
  File "/usr/lib/python3/dist-packages/IPython/terminal/embed.py", line 18, in <module>
    from IPython.terminal.interactiveshell import TerminalInteractiveShell
  File "/usr/lib/python3/dist-packages/IPython/terminal/interactiveshell.py", line 20, in <module>
    from prompt_toolkit.shortcuts import create_prompt_application, create_eventloop, create_prompt_layout, create_output
ImportError: cannot import name 'create_prompt_application'

上面一大串内容,也看不懂,后来查询网上的办法,prompt_toolkit的版本需要进行调整:

pip3 install prompt-toolkit==1.0.15 -i https://pypi.mirrors.ustc.edu.cn/simple

替换prompt-toolkit==1.0.15 完成后:终端有红丝字体提示:

ERROR: jupyter-console 6.1.0 has requirement prompt-toolkit!=3.0.0,!=3.0.1,<3.1.0,>=2.0.0, but you'll have prompt-toolkit 1.0.15 which is incompatible.

字面意思应该是我的版本不太匹配,这个时候我没有管他,重新输入命令:

jupyter contrib nbextension install --user

竟然成功了,大喜。继续后续的命令:

pip3 install jupyter_nbextensions_configurator -i https://pypi.mirrors.ustc.edu.cn/simple

jupyter nbextensions_configurator enable --user

想要的配置全部完成。给自己mark一记

 

 

 

Logo

更多推荐