Our Community is getting an upgrade! To get everything ready for the relaunch, we’ll be placing the site in read-only mode starting September 21st.
We really appreciate your understanding while we get things set up behind the scenes. Catch up on all the exciting details about the move here.
Need help or have questions? Drop us a line at [email protected]

Community Articles

Find and share helpful community-sourced technical articles.
Announcements
Share your experience with Cloudera on G2 and get a $25 Amazon Gift card.
Hi, I'm CLEO! Something exciting is coming to the Community. Stay Tuned!
Labels (1)
avatar
Cloudera Employee

 

A number of customers want to run CDSW R sessions within the Jupyter Notebook.  This is unsuccessful within CDSW when a customer attempts to perform this and results in the following errors depending on how you execute Jupyter.

 

Execution halted
WARNING:root:kernel 8166ed20-6142-44d1-92b8-9a0ae11777a9 restarted
Error in ok_device(filename, ...) : X11 is not available
Calls: <Anonymous> ... evaluate -> dev.new -> do.call -> <Anonymous> -> ok_device
Execution halted

 

By default the Jupyter R Kernel is not shipped with CDSW 1.5+.  In order to get this to work you will have to install the Jupyter R Kernel manually.  The instructions are below as follows:

 

- https://irkernel.github.io/installation/

 

Instructions on installing Jupyter R Kernel from source.

1/2) Installing from source

ZMQ

You'll need zmq development headers to compile pbdZMQ (Click your OS):

R packages

Start R in the same terminal, and proceed as below.

You can install the packages via

install.packages(c('repr', 'IRdisplay', 'IRkernel'), type = 'source')

To update your source installation, repeat above step.

2/2) Making the kernel available to Jupyter

The kernel spec can be installed for the current user with the following line from R:

IRkernel::installspec()

To install system-wide, set user to False in the installspec command:

IRkernel::installspec(user = FALSE)
2,430 Views
Comments
avatar
New Contributor

I'm stuck on this and would really like to use R in jupyterlab as CDSW is putting it plainly a glorified text editor and so would a lot of my colleagues

 

Is there a way to do this without admin rights