python遇到错误ImportError: cannot import name 'create_prompt_application'
alex@ubuntusys:~$python3-mipykernelinstall--userTraceback(mostrecentcalllast):File"/u...
alex@ubuntusys:~$ python3 -m ipykernel install --user
Traceback (most recent call last):
File "/usr/lib/python3.6/runpy.py", line 183, in _run_module_as_main
mod_name, mod_spec, code = _get_module_details(mod_name, _Error)
File "/usr/lib/python3.6/runpy.py", line 142, in _get_module_details
return _get_module_details(pkg_main_name, error)
File "/usr/lib/python3.6/runpy.py", line 109, in _get_module_details
__import__(pkg_name)
File "/usr/local/lib/python3.6/dist-packages/ipykernel/__init__.py", line 2, in <module>
from .connect import *
File "/usr/local/lib/python3.6/dist-packages/ipykernel/connect.py", line 13, in <module>
from IPython.core.profiledir import ProfileDir
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'
有没有大神 展开
Traceback (most recent call last):
File "/usr/lib/python3.6/runpy.py", line 183, in _run_module_as_main
mod_name, mod_spec, code = _get_module_details(mod_name, _Error)
File "/usr/lib/python3.6/runpy.py", line 142, in _get_module_details
return _get_module_details(pkg_main_name, error)
File "/usr/lib/python3.6/runpy.py", line 109, in _get_module_details
__import__(pkg_name)
File "/usr/local/lib/python3.6/dist-packages/ipykernel/__init__.py", line 2, in <module>
from .connect import *
File "/usr/local/lib/python3.6/dist-packages/ipykernel/connect.py", line 13, in <module>
from IPython.core.profiledir import ProfileDir
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'
有没有大神 展开
4个回答
展开全部
你是不是装了 jupyter包,这个包依赖prompt-toolkit版本是2.0.0以上的版本,
而ipython包依赖的是1.0.15的版本,估计是装Jupyter时,将版本更新了,所以运行的时候报错
你把版本切成1.0.15即可
pip install --upgrade prompt-toolkit==1.0.5
而ipython包依赖的是1.0.15的版本,估计是装Jupyter时,将版本更新了,所以运行的时候报错
你把版本切成1.0.15即可
pip install --upgrade prompt-toolkit==1.0.5
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
看不懂看不懂看不懂看不懂看不懂看不懂看不懂看不懂看不懂看不懂看不懂看不懂看不懂看不懂看不懂看不懂看不懂看不懂看不懂看不懂看不懂看不懂看不懂看不懂看不懂看不懂看不懂看不懂看不懂看不懂看不懂看不懂
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询