IRkernel

Installation

1/2) Installing via supplied binary packages
(default on Windows + Mac OS X)

You can install all packages using the following lines in an R console:

install.packages(c('repr', 'IRdisplay', 'evaluate', 'crayon', 'pbdZMQ', 'devtools', 'uuid', 'digest'))
devtools::install_github('IRkernel/IRkernel')
# Don’t forget step 2/2!

To update the IRkernel package, which is not yet on CRAN, you have to rerun the devtools:: line. For the other packages, a simple update.packages() is sufficient.

1/2) Installing from source
(default on Linux)

ZMQ

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

Ubuntu and Debian
sudo apt-get install libzmq3-dev
Fedora
sudo dnf install czmq-devel
Arch Linux
sudo pacman -S zeromq
Homebrew
xcode-select --install
brew install zmq
# or upgrade
brew update
brew upgrade zmq
MacPorts
  1. make sure an X server is installed, open a terminal and do the following:
    xcode-select --install
    sudo port install zmq
  2. Direct the compiler to use MacPorts libraries using:
    export CPATH=/opt/local/include
    export LIBRARY_PATH=/opt/local/lib

See this bugreport for instruction on how to compile on windows.

R packages

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

You can install snapshot packages and the kernel spec via

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

To update your source installation, repeat above step.

1/2) Development Version
(Only recommended to test a bugfix which is not yet in a stable version)

If you want to compile the latest and greatest (and maybe buggiest…) from git, the easiest way is via the devtools package.

On Ubuntu/Debian, a header package is needed to compile RCurl:

sudo apt-get install libcurl4-openssl-dev

Start a R session and run:

install.packages('devtools')
# Need RCurl for install_github
install.packages('RCurl')
library(devtools)
# Install the packages
install_github('IRkernel/repr')
install_github('IRkernel/IRdisplay')
install_github('IRkernel/IRkernel')

To update the git versions, repeat the install_github('IRkernel/...') steps.

2/2) Making the kernel available to Jupyter

If you haven’t done this already, you will have to make Jupyter see the newly installed R kernel by installing a kernel spec.

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)