Calico IPython

From IPRE Wiki
Jump to: navigation, search

Calico IPython

Currently, we are trying to get clrzmq to build on Mac OSX. Works on Linux. Unknown on Windows.

Requirements

  1. ZeroMQ (clrzmq)
    1. sudo apt-get install libzmq1
    2. sudo ln -s /usr/lib/x86_64-linux-gnu/libzmq.so.1 /usr/lib/x86_64-linux-gnu/libzmq.so
  2. jinja2, tornado, pyzmq
    1. Needs Python 2.7 or better
    2. python easy-install
  3. IPython 1.1
    1. See below
  4. MathJax, inside python:
    1. from IPython.external.mathjax import install_mathjax
    2. install_mathjax()
  5. Latest Calico from git
    1. git clone https://bitbucket.org/ipre/calico.git
ipython console --KernelManager.kernel_cmd="['mono', '/path/to/Calico.exe', '--server', '{connection_file}']"

Defining a Calico IPython profile

  1. ipython profile create calico
  2. edit $(ipython locate)/profile_calico/ipython_notebook_config.py
  3. Add:
    1. c.KernelManager.kernel_cmd= ['mono', '/path/to/Calico.exe', '--server', '{connection_file}']

Then you can just enter:

  • ipython console --profile calico
  • ipython notebook --profile calico
  • ipython qtconsole --profile calico

After this, most of the documentation on using IPython is valid. Note that many packages (matplotlib, etc) will not work under Calico.

Virtual Box

  1. installed virtual box from:
    1. http://download.virtualbox.org/virtualbox/4.3.6/VirtualBox-4.3.6-91406-OSX.dmg
  2. downloaded *32-bit* Ubuntu 12.04 LTS iso file from:
    1. http://www.ubuntu.com/download/desktop
  3. set up a new Ubuntu VM using the iso file.
    1. see http://www.youtube.com/watch?v=_42JLz2izBU for more info.
  4. so that we can go into fullscreen mode:
    1. apt-get install dkms build-essential
    2. In the VM, choose menu option Devices -> Insert Guest Additions CM Image...
    3. A new CDROM will appear on the Ubuntu desktop. Rightclick and choose the Autorun.
  5. Also chose Devices -> Shared Clipboard -> Bidirectional
  6. Restarted VM
  7. to create shared folders between guest/host:
    1. see http://helpdeskgeek.com/virtualization/virtualbox-share-folder-host-guest/
    2. to change computer name, see: http://community.linuxmint.com/tutorial/view/735

Connecting to your VM from your host machine

  1. Setup your notebook to listen for external connections (including setting a password)
    1. http://nbviewer.ipython.org/github/Unidata/tds-python-workshop/blob/master/ipython-notebook-server.ipynb
  2. Using port-forwarding to connect the VM
    1. http://stackoverflow.com/questions/5906441/how-to-ssh-to-a-virtualbox-ubuntu-guest-externally-through-a-windows-host

IPython

Setting up ipython on ubuntu 12.04 LTS (1/24/2014)

  1. sudo apt-get install emacs git
  2. sudo apt-get install python-setuptools
  3. sudo apt-get install python-matplotlib
  4. sudo apt-get install python-dev
  5. sudo apt-get install libzmq1 libzmq-dev
  6. sudo easy_install ipython
  7. sudo easy_install tornado
  8. sudo easy_install jinja2
  9. sudo easy_install pyzmq
    1. ipython> from IPython.external.mathjax import install_mathjax
    2. ipython> install_mathjax()

Older Linuxes will require getting a new IPython:

  1. sudo easy_install tornado
  2. sudo easy_install pyzmq
  3. sudo easy_install jinja2
  4. git clone --recursive https://github.com/ipython/ipython.git
  5. cd ipython/
  6. git branch -r
  7. git checkout -b 1.x origin/1.x
  8. git status
  9. git branch
  10. python setup.py build
  11. sudo python setup.py install