IR 内核死于全新安装的 Jupyter

IR Kernel dying with fresh install of Jupyter

这是我的硬件

:~/Downloads$ lscpu
Architecture:          x86_64
CPU op-mode(s):        32-bit, 64-bit
Byte Order:            Little Endian
CPU(s):                4

这是我的OS

uname -a
Linux   4.4.0-21-generic #37-Ubuntu SMP Mon Apr 18 18:33:37 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux

这是我的 Jupyter 信息

Jupyter notebook.

The version of the notebook server is 4.2.1 and is running on:

Python 3.5.2 |Anaconda 4.1.1 (64-bit)| (default, Jul  2 2016, 17:53:06) 
[GCC 4.4.7 20120313 (Red Hat 4.4.7-1)]

我使用 https://www.continuum.io/blog/developer/jupyter-and-conda-r

安装了 R Essentials 包

但是当我尝试制作一个新的 R 笔记本时,IR 内核就死了。有人在解决方案中使用 Jupyter 和 R 吗?

错误信息

The kernel appears to have died. It will restart automatically.

Dead kernel

The kernel has died, and the automatic restart has failed. It is possible the kernel cannot be restarted. If you are not able to restart the kernel, you will still be able to save the notebook, but running code will no longer work until the notebook is reopened.

我的问题是 Python 工作正常,但 R 版本死了。我如何在 Jupyter

中使用 R

您的问题是版本兼容性问题。目前IRkernel还没有升级到最IPython/Jupyter版本。如果您尝试在 R 或 RStudio 中安装 de novo

devtools::install_github('IRkernel/IRkernel')
IRkernel::installspec(name = 'ir33', displayname = 'R 3.3')

或者您可以在 R 或 RStudio 中检查如下(等同于上述):

library(devtools)
install_github('IRkernel/IRkernel')
library(IRkernel)
installspec(name = 'ir33', displayname = 'R 3.3') ##update your R version according to check which version of R you have
 R.version.string

您会收到一条错误消息:

Jupyter or IPython 3.0 has to be installed but could neither run “jupyter” nor “ipython”, “ipython2” or “ipython3”.

这里最好的办法就是等待开发者升级。希望他们能尽快解决问题。

如果您此时确实需要解决问题,您应该安装历史版本的IPython和运行上面的命令: Link to IPython 3.x Series

你在安装 Jupyter 之前安装了 R 吗?如果是这样,我遇到了同样的情况并通过按指定顺序卸载并重新安装解决了:

R is dead in Jupyter