The current master branch and gem version >= 0.2 are compatible with IPython3/Jupyter. If you require IPython2 support, please install an older gem version < 0.2 or use the branch ipython2
The installation instructions are divided according to environments mainly because of ZeroMQ.
At first install IPython/Jupyter. I recommend an installation using virtualenv.
apt-get install python3-dev virtualenv libzmq3-dev virtualenv -p python3 venv source venv/bin/activate pip install 'ipython[notebook]'
After that, install the Ruby gem.
gem install rbczmq gem install iruby
Now you can run iruby with:
At first install IPython/Jupyter. I recommend an installation using Enthought Canopy.
After that install ZeroMQ Legacy Stable Release 3.2.4 x86 build for Windows XP SP3 and newer.
Add the dll path to the PATH system variable.
Run two commands below:
gem install ffi-rzmq gem install iruby
Now you can run iruby with:
I recommend an installation using Anaconda.
After that, run three commands shown below.
brew install libtool autoconf automake autogen gem install rbczmq gem install iruby
At first install IPython/Jupyter. There is a pyzmq ports (ports/net/py-pyzmq) which depends on libzmq4, however, it doesn't works with ipython. Therefore we use libzmq3 like the following:
- make your ports tree up-to-date.
replace LIBDEPENDS line in ports/net/py-pyzmq/Makefile
install related packages
$ sudo pkg install libzmq3 py27-qt4-gui py27-pexpect-3.3 py27-qt4-svg py27-pygments py27-Jinja2 py27-tornado py27-jsonschema
make install using ports
$ cd /usr/ports/net/py-pyzmq $ sudo make install $ cd /usr/ports/devel/ipython $ sudo make install
Then, install iruby and related ports and gems.
$ sudo pkg install rubygem-mimemagic $ sudo gem install ffi-rzmq # install ffi, ffi-rzmq-core and ffi-rzmq $ git clone https://github.com/SciRuby/iruby.git $ cd iruby $ gem build iruby.gemspec $ sudo gem install iruby-0.2.7.gem
Installation for jRuby
Since jRuby is fully compatible with Ruby version 2.2, it is possible to use iruby with jRuby. It can be helpful if you want to use java classes in your iruby notebook. This will require the following software:
- jRuby version >= 126.96.36.199
- ZeroMQ version >= 4.1.4 (You may have to build it from source.)
- ffi-rzmq gem
- this iruby gem
After installation, make sure that your
env is set up to jruby.
$ env ruby -v
If you use RVM, it is enough to switch the current version to jruby. If you have already used iruby with a different version, you need to generate a new kernel:
$ iruby register --force
After that you can use iruby with jRuby in usual way.
After the installation
Take a look at the example notebook and the collection of notebooks which includes a Dockerfile to create a containerized installation of iruby and other scientific gems. You can find the prebuild image at dockerhub.
- IPython/Jupyter >= 3.0.0
- Ruby >= 2.1.0
If you install IRuby with ffi-rzmq instead of rbczmq, libzmq >= 3.2 is added to the list above.
See the CONTRIBUTORS file.
Copyright © 2013-15, IRuby contributors and the Ruby Science Foundation.
All rights reserved.