Installation

The instructions to install IJavascript are platform-dependent and very much determined by the following dependencies:

Contents

Debian and Ubuntu

The Jupyter notebook is not yet available in the Debian 8.3 and Ubuntu 16.04 LTS repositories. Instead, the IPython notebook can be installed:

sudo apt-get install nodejs-legacy npm ipython ipython-notebook

Alternatively, the Jupyter notebook can be installed via pip or Anaconda.

pip installs the latest Jupyter release from the Python Package Index:

sudo apt-get install nodejs-legacy npm g++ libzmq3-dev python-dev python-pip
sudo pip install --upgrade jupyter

And Anaconda provides a data science platform that distributes both Jupyter (by default) and Node.js (optionally). IJavascript can be installed in an Anaconda setup as follows:

conda install nodejs
npm install -g ijavascript

Global installation

IJavascript can be installed globally (i.e. for all users in the system) by running:

sudo npm install -g ijavascript

Local installation

It is also possible to install IJavascript locally, by setting the npm prefix to your home folder:

npm config set prefix ~
npm install -g ijavascript

Note that the above command will install all the IJavascript executables in the folder ~/bin/ and the ijavascript package in ~/lib/node_modules.

PPA repository

Gordon Ball has set up a PPA repository that builds deb packages for IJavascript and other Jupyter kernels:

sudo add-apt-repository ppa:chronitis/jupyter
sudo apt update
sudo apt install ijavascript

Older versions

To install IJavascript in older versions of Debian and Ubuntu, Node.js needs upgrading to a recent version. You can do so by running:

sudo apt-get install curl
curl -sL https://deb.nodesource.com/setup_4.x | sudo -E bash -
sudo apt-get install -y nodejs

The instructions for upgrading Node.js have been adapted from those found here.

macOS

Homebrew and pip can be used to install the dependencies of IJavascript in macOS:

ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
brew install pkg-config node zeromq
sudo easy_install pip
sudo pip install --upgrade pyzmq jupyter

Once the dependencies have been installed, npm can be used to install IJavascript as described above in the section for Ubuntu and Debian.

Also note that the build tool node-gyp (which is part of Node.js and is used to compile native modules) requires Python 2.

Windows

Jupyter could be installed following the instructions here. I find more convenient to install a Python distribution such as Anaconda. Anaconda not only installs Jupyter and its requirements, but also a selection of frequently-used Python packages.

Node.js provides a Windows installer. However, the build tool node-gyp will not be functional unless one of the recognised C++ compilers is installed. See here for more details, here for Visual Studio Express 2012 or here for a link to Visual Studio Express 2013.

nvm

nvm is a popular Node Version Manager for users to install specific versions of Node in their own home folder. These types of installations do not require the use of sudo to install global packages, simply run:

npm install -g ijavascript

Another consideration for nvm users is that IJavascript makes use of zeromq, a native module that provides ZMQ bindings. Native modules are specific to a Node version, and thus they need reinstalling whenever the Node version changes. To do so, run:

nvm reinstall-packages

Other platforms

For other platforms, instructions to install the IJavascript dependencies may be found at: