【问题标题】:IPython kernel dies on startupIPython 内核在启动时死机
【发布时间】:2015-08-25 14:15:39
【问题描述】:

我正在运行 Ubuntu 64 位并使用 Anaconda 发行版中的 IPython。当我在终端中键入“ipython notebook”时,一切都会按原样启动。但是当我创建一个新笔记本或打开一个现有笔记本时,内核会死掉,尝试重新启动,然后失败。

这是来自终端的整个会话的信息,有错误:

[W 08:54:43.010 NotebookApp] ipywidgets package not installed.  Widgets are unavailable.
[I 08:54:43.018 NotebookApp] Serving notebooks from local directory: /home/eric
[I 08:54:43.018 NotebookApp] 0 active kernels 
[I 08:54:43.018 NotebookApp] The IPython Notebook is running at: http://localhost:8888/
[I 08:54:43.018 NotebookApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).
Created new window in existing browser session.
[I 08:54:47.720 NotebookApp] Creating new notebook in 
[W 08:54:48.468 NotebookApp] 404 GET /nbextensions/widgets/notebook/js/extension.js?v=20150825085443 (127.0.0.1) 5.44ms referer=http://localhost:8888/notebooks/Untitled2.ipynb?kernel_name=python2
[I 08:54:48.529 NotebookApp] Kernel started: e595c923-cc96-4ab7-ae39-d2fe4eac1261
[I 08:54:51.531 NotebookApp] KernelRestarter: restarting kernel (1/5)
[W 08:54:58.554 NotebookApp] Timeout waiting for kernel_info reply from e595c923-cc96-4ab7-ae39-d2fe4eac1261
[I 08:55:00.535 NotebookApp] KernelRestarter: restarting kernel (1/5)
WARNING:root:kernel e595c923-cc96-4ab7-ae39-d2fe4eac1261 restarted
*** stack smashing detected ***: /home/eric/anaconda/bin/python terminated
Aborted (core dumped)

当我从终端使用 IPython(没有 html)时,一切正常。我已经重新安装了 IPython,但这并没有改变任何东西。很感谢任何形式的帮助。谢谢!

【问题讨论】:

  • 如果你在没有扩展 /nbextensions/widgets/notebook/js/extension.js 的情况下启动它仍然会崩溃吗?
  • 感谢您的回复。如果没有扩展,我将如何启动?
  • 我自己从来没有做过(我不使用扩展系统),但这看起来很有希望:github.com/ipython-contrib/IPython-notebook-extensions/…(或下一项查看安装了哪些扩展)
  • 看起来我没有任何扩展,包括你提到的那个,所以我认为这不是问题。不过感谢您的想法。

标签: python ipython anaconda


【解决方案1】:

尝试运行

import socket
print( '127.0.0.1 ' + socket.gethostname() + '.local' )

并将输出添加到 /etc/hosts 如果 socket.gethostbyname_ex 出现问题,它将有所帮助

相关问题gethostbyname_ex(hostname) extremely slow

这可能会有所帮助

conda remove pyzmq
conda install pyzmq=14.6.0

https://github.com/jupyter/notebook/issues/297

【讨论】:

    猜你喜欢
    • 2015-12-10
    • 1970-01-01
    • 2016-03-18
    • 2015-10-27
    • 1970-01-01
    • 2021-06-04
    • 2021-08-20
    • 1970-01-01
    • 2013-07-04
    相关资源
    最近更新 更多