Testing the IPython 0.12 Notebook

Testing the IPython 0.12 Notebook

08 mai 2012 | Catégories: sage | View Comments

On December 21 2011, version 0.12 of IPython was released with its own notebook. The differences with the Sage Notebook are explained by Fernando Perez, leader of IPython project, in the blog post The IPython notebook: a historical retrospective he wrote last January. One of the differences is that the IPython Notebook run in its own directory whereas each cell of the Sage Notebook lives in its directory.

The latest version of IPython is 0.12.1 and was released in April 2012 and I was curious of testing it. I followed the installations informations. I got into trouble some times but finally managed to install it. Below is how I did to install IPython 0.12.1 on my OSX 10.5.8 using Python 2.6.7.

Installing dependencies:

sudo easy_install-2.6 tornado
sudo easy_install-2.6 nose
sudo easy_install-2.6 pyzmq

The following command was broken for a while:

sudo easy_install-2.6 pyzmq

ending with error TypeError: 'NoneType' object is not callable. I managed to make it work by redoing the above install commands in the correct above order:

sudo easy_install-2.6 tornado
sudo easy_install-2.6 nose
sudo easy_install-2.6 pyzmq

Installing ipython-0.12:

sudo easy_install-2.6 ipython

To make ipython known from the command line, I added the following line to the file ~/.bash_profile:

# ipython
export PATH=/opt/local/Library/Frameworks/Python.framework/Versions/2.6/bin:$PATH

I tested the ipython installation with the iptest command. It finishes with Status: OK

iptest

I open the ipython notebook and it worked:

ipython notebook
[NotebookApp] Using existing profile dir: u'/Users/slabbe/.ipython/profile_default'
[NotebookApp] The IPython Notebook is running at: http://127.0.0.1:8888
[NotebookApp] Use Control-C to stop this server and shut down all kernels.

In safari, I get the following problem:

Websocket connection to
ws://127.0.0.1:8888/kernels/86fef706-f386-4116-b3e4-d6d7776afb0d could not
be established.  You will NOT be able to run code.  Your browser may not be
compatible with the websocket version in the server, or if the url does not
look right, there could be an error in the server's configuration.

But, in firefox, it works when I open a page at the above adress http://127.0.0.1:8888. It gives me the following dashboard page.

/Files/2012/ipynb_dashboard.png

I created my first notebook and did some tests. I followed the documentation found here.

/Files/2012/ipynb_notebook.png

The next thing would be to try to use this with Sage. Some progress has been done and can be followed at ticket #12719.

blog comments powered by Disqus