Sim*_*mon 7 python jupyter jupyter-notebook
我对 Jupyter Notebook 完全陌生。
目前,我正在使用带 R 的笔记本,并且运行良好。
现在,我尝试将它与 Python 一起使用,但收到以下错误。
[I 09:00:52.947 NotebookApp] KernelRestarter:重新启动内核(4/5),新的随机端口
回溯(最近一次调用最后一次):
文件“/usr/lib/python3.6/runpy.py”,第 193 行,在 _run_module_as_main“main”,mod_spec 中)
文件“/usr/lib/python3.6/runpy.py”,第 85 行,在 _run_code exec(code, run_globals) 中
文件“/home/frey/.local/lib/python3.6/site-packages/ipykernel_launcher.py”,第 15 行,来自 ipykernel import kernelapp as app
文件“/home/frey/.local/lib/python3.6/site-packages/ipykernel/init.py”,第 2 行,来自 .connect import *
文件“/home/frey/.local/lib/python3.6/site-packages/ipykernel/connect.py”,第 13 行,来自 IPython.core.profiledir import ProfileDir
文件“/home/frey/.local/lib/python3.6/site-packages/IPython/init.py”,第 55 行,来自 .terminal.embed import embed
文件“/home/frey/.local/lib/python3.6/site-packages/IPython/terminal/embed.py”,第 16 行,来自 IPython.terminal.interactiveshell import TerminalInteractiveShell
文件“/home/frey/.local/lib/python3.6/site-packages/IPython/terminal/interactiveshell.py”,第20行,来自prompt_toolkit.formatted_text导入PygmentsTokens ModuleNotFoundError:没有名为“prompt_toolkit.formatted_text”的模块
[W 09:00:55.956 NotebookApp] KernelRestarter:重新启动失败 [W 09:00:55.956 NotebookApp] 内核 24117cd7-38e5-4978-8bda-d1b84f498051 死亡,从地图中删除。
希望有人可以帮助我。
ipython` 7.0.1 要求提示工具包 <2.1.0,>=2.0.0,但您将拥有不兼容的提示工具包 1.0.15
升级prompt-toolkit
将解决该问题。
pip install --upgrade prompt-toolkit
Run Code Online (Sandbox Code Playgroud)