【问题标题】:Jupyter kernel keeps crashing -- "No module named prompt_toolkit.formatted_text"Jupyter 内核不断崩溃——“没有名为 prompt_toolkit.formatted_text 的模块”
【发布时间】:2019-03-07 05:56:28
【问题描述】:

我无法让 Jupyter Notebook 运行——它不断重启内核并给出错误消息,

ImportError: No module named 'prompt_toolkit.formatted_text'

网上的一些帖子说这是 ipython 版本控制的问题,可以通过回滚来修复,但这对我不起作用。

这是我当前的相关软件包版本:

  • conda==4.5.11
  • ipykernel==4.10.0
  • ipython==6.5.0
  • ipython-genutils==0.2.0
  • ipywidgets==7.4.2
  • jupyter==1.0.0
  • jupyter-client==5.2.3
  • jupyter-console==4.1.1
  • jupyter-core==4.4.0
  • jupyter-kernel-gateway==2.1.0
  • jupyterlab==0.34.12
  • jupyterlab-launcher==0.13.1
  • 笔记本==5.7.0
  • 提示工具包==1.0.15

您能提供的任何帮助都会很棒。谢谢!

【问题讨论】:

    标签: python-3.x jupyter-notebook


    【解决方案1】:

    Jupyter Notebook 确实有同样的问题。重点是ipython 需要prompt-toolkit 的特定版本。就我而言,我有 ipython 7.2.0 这需要 prompt-toolkit =2.0.0

    我刚刚在 requirements.txt 中添加了prompt-toolkit<2.1.0,>=2.0.0 来解决这个问题。

    尝试运行pip install prompt_toolkit 并查看您的项目中需要哪个版本的prompt_toolkit

    【讨论】:

      猜你喜欢
      • 2019-03-11
      • 1970-01-01
      • 2018-06-16
      • 2016-01-17
      • 2014-07-07
      • 2016-11-10
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多