Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Unable to load IRKernel in Jupyter notebook

I'm pretty new to the forum, so I'm sorry if this question has already been answered. I looked around, and although I saw that some had similar issues, I couldn't find the solution to my problem on any previous posts. So - here goes...

I'm running Mac OS X 10.11.5, Jupyter notebook version 4.2.1, R version 3.2.2

I installed the R kernel for Jupyter notebook with the following command -

conda install -c r r-irkernel

Now, when I launch Jupyter notebook, I see 'R' appears as one of the options in the drop down menu on the right hand side under 'notebooks.' However, when I try to create an R notebook, the kernel crashes and I get the following error in terminal:

WARNING:root:kernel b42781ab-ebb1-45eb-8a54-d3801106fb94 restarted
Error: .onLoad failed in loadNamespace() for 'pbdZMQ', details:  
  call: dyn.load(file, DLLpath = DLLpath, ...)
  error: unable to load shared object '/Users/avislova/anaconda/lib/R/library/pbdZMQ/libs/pbdZMQ.so':
  dlopen(/Users/avislova/anaconda/lib/R/library/pbdZMQ/libs/pbdZMQ.so,     6): Library not loaded: @rpath/libzmq.5.dylib
  Referenced from: /Users/avislova/anaconda/lib/R/library/pbdZMQ/libs/pbdZMQ.so
  Reason: image not found
Execution halted
 [W 16:19:12.382 NotebookApp] KernelRestarter: restart failed
 [W 16:19:12.382 NotebookApp] Kernel b42781ab-ebb1-45eb-8a54-d3801106fb94 died, removing from map.
ERROR:root:kernel b42781ab-ebb1-45eb-8a54-d3801106fb94 restarted failed!
 [W 16:19:12.390 NotebookApp] Kernel deleted before session
 [W 16:19:12.390 NotebookApp] 410 DELETE /api/sessions/2236e334-e33a-483b-87f3-31c461d4903b (::1) 1.32ms referer=http://localhost:8888/notebooks/Untitled5.ipynb?kernel_name=ir

Any idea where I can go from here?

Thank you!

like image 678
A. Vislova Avatar asked Jul 15 '16 02:07

A. Vislova


People also ask

Why is my Jupyterlab not launching?

Jupyter fails to start If you're using a menu shortcut or Anaconda launcher to start it, try opening a terminal or command prompt and running the command jupyter notebook . If it can't find jupyter , you may need to configure your PATH environment variable.


1 Answers

I faced similar issue after I updated 'R' on my mac.

Below steps resolved my issue

install.packages(c('pbdZMQ', 'repr', 'devtools'))  
devtools::install_github('IRkernel/IRdisplay')
devtools::install_github('IRkernel/IRkernel')
IRkernel::installspec()  

For details refer http://johnlaudun.org/20160521-irkernel-difficulties/

like image 123
Jeevan Avatar answered Sep 21 '22 00:09

Jeevan