Skip to content

Instantly share code, notes, and snippets.

@ascatanach
Last active March 15, 2016 21:12
Show Gist options
  • Save ascatanach/57274d142379dacb7f89 to your computer and use it in GitHub Desktop.
Save ascatanach/57274d142379dacb7f89 to your computer and use it in GitHub Desktop.
Installing R Kernel for Jupyter (Ubuntu VM on VirtualBox)

Compiled 21/5/2015 from:
https://github.com/IRkernel/IRkernel
quinnj/Sublime-IJulia#45

Upgrade R base (need to repeat this after upgrade so might as well start with the latest)
$ sudo apt-get update

$ sudo apt-get install r-base

Need another repository to get the dependencies:
$ sudo add-apt-repository ppa:chris-lea/zeromq

Update:
$ sudo apt-get update

libzmq3 dependency: $ sudo apt-get install libzmq3-dbg libzmq3-dev libzmq3

start R:
$ R

need dependency uuid:
>install.packages("uuid")
(may need to download http://www.rforge.net/uuid/snapshot/uuid_0.1-2.tar.gz then install from source eg install.packages("/home/user/Downloads/uuid_0.1-2.tar.gz, repos = NULL, type = "source")

install the following R packages:
> install.packages(c('rzmq','repr','IRkernel','IRdisplay'), repos = 'http://irkernel.github.io/', type = 'source')

Install the required dependencies that come up eg:
> install.packages(c("evaluate", "jsonlite", "digest", "base64enc"))

Now repeat:
> install.packages(c('rzmq','repr','IRkernel','IRdisplay'), repos = 'http://irkernel.github.io/', type = 'source')

Then:
> IRkernel::installspec()

Start ipython notebook, select R Kernel. If you want to bash magic you need to change kernels within the notebook.

@jeanpat
Copy link

jeanpat commented Sep 19, 2015

Thanks for your tuto,

Every steps went smoothly. However when trying 1+1 in an R notebook, there's just not output (Doing the same in an R console yields 2).

$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 15.04
Release: 15.04
Codename: vivid

$ uname -a
Linux jeanpat-WA50SHQ 4.1.3-040103-generic #201507220129 SMP Wed Jul 22 01:31:38 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment