gpt4 book ai didi

python - 没有名为 'prompt_toolkit.formatted_text' 的模块

转载 作者:行者123 更新时间:2023-12-05 05:14:19 24 4
gpt4 key购买 nike

我是 Jupyter Notebook 的新手。

目前,我正在使用带有 R 的笔记本,它运行良好。

现在,我尝试将它与 Python 一起使用,但收到以下错误。

[I 09:00:52.947 NotebookApp] KernelRestarter: restarting kernel (4/5), new random ports

Traceback (most recent call last):

File "/usr/lib/python3.6/runpy.py", line 193, in _run_module_as_main "main", mod_spec)

File "/usr/lib/python3.6/runpy.py", line 85, in _run_code exec(code, run_globals)

File "/home/frey/.local/lib/python3.6/site-packages/ipykernel_launcher.py", line 15, in from ipykernel import kernelapp as app

File "/home/frey/.local/lib/python3.6/site-packages/ipykernel/init.py", line 2, in from .connect import *

File "/home/frey/.local/lib/python3.6/site-packages/ipykernel/connect.py", line 13, in from IPython.core.profiledir import ProfileDir

File "/home/frey/.local/lib/python3.6/site-packages/IPython/init.py", line 55, in from .terminal.embed import embed

File "/home/frey/.local/lib/python3.6/site-packages/IPython/terminal/embed.py", line 16, in from IPython.terminal.interactiveshell import TerminalInteractiveShell

File "/home/frey/.local/lib/python3.6/site-packages/IPython/terminal/interactiveshell.py", line 20, in from prompt_toolkit.formatted_text import PygmentsTokens ModuleNotFoundError: No module named 'prompt_toolkit.formatted_text'

[W 09:00:55.956 NotebookApp] KernelRestarter: restart failed [W 09:00:55.956 NotebookApp] Kernel 24117cd7-38e5-4978-8bda-d1b84f498051 died, removing from map.

希望有人能帮助我。

最佳答案

ipython` 7.0.1 has requirement prompt-toolkit<2.1.0,>=2.0.0, but you'll have prompt-toolkit 1.0.15 which is incompatible

https://github.com/jupyter/jupyter_console/issues/158

升级 prompt-toolkit 将解决这个问题。

pip install --upgrade prompt-toolkit

关于python - 没有名为 'prompt_toolkit.formatted_text' 的模块,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/52676660/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com