【问题标题】:Kernel Has Died - ipython内核已经死了 - ipython
【发布时间】:2013-07-04 09:12:47
【问题描述】:

我开始熟悉 ipython,现在我变成了一个奇怪的错误:Kernel Has Died 谁能建议一个简单的工作流程来解决这个问题?

[IPKernelApp] --existing kernel-dc484a8e-c822-46b1-bc6d-a1e019a67258.json
[NotebookApp] Kernel dc484a8e-c822-46b1-bc6d-a1e019a67258 failed to respond to heartbeat

我也变成了:

"The kernel has died, would you like to restart it? If you do not restart the kernel, you will be able to save the notebook, but running code will not work until the notebook is reopened."

当我尝试运行指令时总是会出现这个问题:

pieces = {'G-C': Cond.ix[:, [1]],
          'G-M': M.ix[:, [1]],
          'G-M+A': MA.ix[:, [1]],
          'G-M+T': MT.ix[:, [1]],
          'G-L': L.ix[:, [1]],
          'G-L+A': MA.ix[:, [1]],
          'G-L+T': LT.ix[:, [1]]
          }

【问题讨论】:

  • 您应该提供更多详细信息。哪个版本的 IPython?哪个操作系统?你在做一些具体的事情吗……等等
  • 我正在使用 IPython3 和 ubuntu 13.04。我想连接几个表中的列。
  • 这是行不通的指令:{pieces = {'G-C': Cond.ix[:, [1]], 'G-M': M.ix[:, [1]], 'G-M+A': MA.ix[:, [1]], 'G-M+T': MT.ix[:, [1]], 'G-L': L .ix[:, [1]], 'G-L+A': MA.ix[:, [1]], 'G-L+T': LT.ix[:, [1]] }}
  • 您能找出导致崩溃的数据对象(Cond.M 等)吗?尝试在笔记本的单个单元格中执行每个 .ix 语句。

标签: kernel ipython python-3.3 ipython-notebook


【解决方案1】:

我也遇到了同样的问题。我的问题已通过以下步骤解决 -

  • 转到 Conda 终端并关闭正在运行的内核(按 Ctrl+c)

  • 下一个类型

    pip install ipyparallel  
    

    这将重新安装 ipyparallel

  • 然后重启 jupyter-notebook

【讨论】:

  • 我的问题是其他 jupiter notebook 已经在使用内存,所以内存不足。如果您使用的是 tensorflow,请检查您是否尚未在后台创建图表。
【解决方案2】:

如果它可靠地发生在同一条指令上,则该指令正在使内核崩溃,您只会收到警告。无法确定内核是否崩溃,或者与它的网络连接是否断开。尝试在纯 python 解释器上重现,并有一个完整的最小可重现示例,我们可以决定是否存在要报告的错误以及报告的位置。

【讨论】:

    猜你喜欢
    • 2021-04-20
    • 2017-08-12
    • 1970-01-01
    • 2018-04-11
    • 2019-05-16
    • 1970-01-01
    • 1970-01-01
    • 2021-08-20
    • 1970-01-01
    相关资源
    最近更新 更多