jupyter 启动python3 内核 总是出现错误 ImportError: cannot import name 'create_prompt_application'

前一阶段因安装各种包将jupyter依赖包版本做了升级, 

 

出现启动python3 kernel 之后自动失败,

如下图

具体错误如下:

Traceback (most recent call last):
File "/home/ubuntu/anaconda3/lib/python3.6/runpy.py", line 193, in _run_module_as_main
"__main__", mod_spec)
File "/home/ubuntu/anaconda3/lib/python3.6/runpy.py", line 85, in _run_code
exec(code, run_globals)
File "/home/ubuntu/anaconda3/lib/python3.6/site-packages/ipykernel_launcher.py", line 15, in <module>
from ipykernel import kernelapp as app
File "/home/ubuntu/anaconda3/lib/python3.6/site-packages/ipykernel/__init__.py", line 2, in <module>
from .connect import *
File "/home/ubuntu/anaconda3/lib/python3.6/site-packages/ipykernel/connect.py", line 13, in <module>
from IPython.core.profiledir import ProfileDir
File "/home/ubuntu/anaconda3/lib/python3.6/site-packages/IPython/__init__.py", line 55, in <module>
from .terminal.embed import embed
File "/home/ubuntu/anaconda3/lib/python3.6/site-packages/IPython/terminal/embed.py", line 16, in <module>
from IPython.terminal.interactiveshell import TerminalInteractiveShell
File "/home/ubuntu/anaconda3/lib/python3.6/site-packages/IPython/terminal/interactiveshell.py", line 22, 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版本与iptrhon版本不对应导致 本版本是pip3 install prompt-toolkit==1.0.15

下一篇文章讲述在增加Conda 虚拟环境kernel时遇到版本又不一致的问题。

 

posted on 2020-10-14 10:56  Zhearts  阅读(1329)  评论(0编辑  收藏  举报

导航