Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Jupyter R kernel crashes

I have just installed the R essentials from Anaconda (having R already installed on my computer) in order to use R in Jupyter.

Now, when I open a new R notebook in Jupyter, after few seconds (without even typing anything) the kernel crashes and needs to be restarted.

The error I get on the terminal is

[I 12:30:36.297 NotebookApp] Kernel started: dd5dd612-2c8f-4235-9619-1cf5a46b3e89

IRkernel::main() Error in dyn.load(file, DLLpath = DLLpath, ...) : unable to load shared object '/home/alberto/R/x86_64-pc-linux-gnu-library/3.2/stringi/libs/stringi.so': /home/alberto/anaconda3/lib/R/library/rzmq/libs/../../../../libstdc++.so.6: version CXXABI_1.3.8' not found (required by /home/alberto/R/x86_64-pc-linux-gnu-library/3.2/stringi/libs/stringi.so) Calls: :: ... tryCatch -> tryCatchList -> tryCatchOne -> <Anonymous> Execution halted [I 12:30:39.299 NotebookApp] KernelRestarter: restarting kernel (1/5) IRkernel::main() Error in dyn.load(file, DLLpath = DLLpath, ...) : unable to load shared object '/home/alberto/R/x86_64-pc-linux-gnu-library/3.2/stringi/libs/stringi.so': /home/alberto/anaconda3/lib/R/library/rzmq/libs/../../../../libstdc++.so.6: versionCXXABI_1.3.8' not found (required by /home/alberto/R/x86_64-pc-linux-gnu-library/3.2/stringi/libs/stringi.so) Calls: :: ... tryCatch -> tryCatchList -> tryCatchOne -> Execution halted [I 12:30:42.309 NotebookApp] KernelRestarter: restarting kernel (2/5) IRkernel::main() Error in dyn.load(file, DLLpath = DLLpath, ...) : unable to load shared object '/home/alberto/R/x86_64-pc-linux-gnu-library/3.2/stringi/libs/stringi.so': /home/alberto/anaconda3/lib/R/library/rzmq/libs/../../../../libstdc++.so.6: version CXXABI_1.3.8' not found (required by /home/alberto/R/x86_64-pc-linux-gnu-library/3.2/stringi/libs/stringi.so) Calls: :: ... tryCatch -> tryCatchList -> tryCatchOne -> <Anonymous> Execution halted [I 12:30:45.315 NotebookApp] KernelRestarter: restarting kernel (3/5) IRkernel::main() Error in dyn.load(file, DLLpath = DLLpath, ...) : unable to load shared object '/home/alberto/R/x86_64-pc-linux-gnu-library/3.2/stringi/libs/stringi.so': /home/alberto/anaconda3/lib/R/library/rzmq/libs/../../../../libstdc++.so.6: versionCXXABI_1.3.8' not found (required by /home/alberto/R/x86_64-pc-linux-gnu-library/3.2/stringi/libs/stringi.so) Calls: :: ... tryCatch -> tryCatchList -> tryCatchOne -> Execution halted [W 12:30:46.485 NotebookApp] Timeout waiting for kernel_info reply from dd5dd612-2c8f-4235-9619-1cf5a46b3e89 [I 12:30:48.322 NotebookApp] KernelRestarter: restarting kernel (4/5) WARNING:root:kernel dd5dd612-2c8f-4235-9619-1cf5a46b3e89 restarted IRkernel::main() Error in dyn.load(file, DLLpath = DLLpath, ...) : unable to load shared object '/home/alberto/R/x86_64-pc-linux-gnu-library/3.2/stringi/libs/stringi.so': /home/alberto/anaconda3/lib/R/library/rzmq/libs/../../../../libstdc++.so.6: version `CXXABI_1.3.8' not found (required by /home/alberto/R/x86_64-pc-linux-gnu-library/3.2/stringi/libs/stringi.so) Calls: :: ... tryCatch -> tryCatchList -> tryCatchOne -> Execution halted [W 12:30:51.329 NotebookApp] KernelRestarter: restart failed [W 12:30:51.329 NotebookApp] Kernel dd5dd612-2c8f-4235-9619-1cf5a46b3e89 died, removing from map. ERROR:root:kernel dd5dd612-2c8f-4235-9619-1cf5a46b3e89 restarted failed! [W 12:30:51.361 NotebookApp] Kernel deleted before session

I guess it might be a problem with shared libraries but I can't figure out how to solve it...

like image 575
Alberto Avatar asked Oct 19 '15 10:10

Alberto


People also ask

How do I stop Jupyter Notebook from crashing?

Try disabling any browser extensions and/or any Jupyter extensions you have installed. Some internet security software can interfere with Jupyter. If you have security software, try turning it off temporarily, and look in the settings for a more long-term solution.

Can Jupyter Notebook work with R?

The Jupyter Notebook is a Web application which permits to create live code in different languages. Usually, developers exploit the Jupyter Notebook to write code in Python. However, Jupyter also supports other programming languages, including Java, R, Julia, Matlab, Octave, Scheme, Processing, Scala and many others.

What does restarting the kernel do in Jupyter Notebook?

As we get more kernels for Jupyter in VS Code, i believe we could end up with more kernels that require the ability to restart a kernel. Basically the kernel restart is used to kill the old dead/hung/unusable kernel and start with a whole new kernel (with new state).


1 Answers

(TEMP FIX ONLY)

See this discussion: https://groups.google.com/a/continuum.io/forum/#!topic/conda/nqPfPGYP--g

I was able to get my kernel running using the suggested temporary fix:

$ conda remove gcc libgcc

like image 175
Aman Avatar answered Oct 24 '22 03:10

Aman