【python】 Anaconda3配置好后,启动jupyter服务异常的解决方法
在服务器Ubuntu16-64bit上安装了Anaconda3,并配置好jupyter参数, 启动时却报错:
Traceback (most recent call last):
File "/root/anaconda3/lib/python3.6/runpy.py", line 193, in _run_module_as_main
"__main__", mod_spec)
File "/root/anaconda3/lib/python3.6/runpy.py", line 85, in _run_code
exec(code, run_globals)
File "/root/anaconda3/lib/python3.6/site-packages/ipykernel_launcher.py", line 15, in <module>
from ipykernel import kernelapp as app
File "/root/anaconda3/lib/python3.6/site-packages/ipykernel/__init__.py", line 2, in <module>
from .connect import *
File "/root/anaconda3/lib/python3.6/site-packages/ipykernel/connect.py", line 13, in <module>
from IPython.core.profiledir import ProfileDir
File "/root/anaconda3/lib/python3.6/site-packages/IPython/__init__.py", line 55, in <module>
from .terminal.embed import embed
File "/root/anaconda3/lib/python3.6/site-packages/IPython/terminal/embed.py", line 16, in <module>
from IPython.terminal.interactiveshell import TerminalInteractiveShell
File "/root/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
版本过高导致不兼容,解决方案:
pip install prompt-toolkit==1.0.15
Tips: 在使用pip安装源时,可以换成国内高速的清华源以加速下载。