aliquot

< a quantity that can be divided into another a whole number of time />

IPython 0.11, the new killer app

August 1, 2011

IPython 0.11 has just been released. It’s amazing how many new features are now available in this Python “comprehensive environment for interactive and exploratory computing”.

Installing on Mac OS X Lion

The installation of IPython is simple if you use easy_install. However, to benefit from the new qtconsole, you’ll need to have a working Qt framework and install either PyQt4 or PySide, as documented here. Only the latter worked for me, at the moment. Of course, we also need to install the Qt SDK. This is quite straightforward as OS X packages are available from Nokia download page. Be aware that the compilation is rather long (about 30’ on my Macbook air 2010).

Here is how I did for the Python part:

$ sudo easy_install readline
$ sudo easy_install ipython
$ sudo easy_install pyzmq

Instead of building PySide myself, I downloaded a package from here (pyside-1.0.5-qt47-py27apple.pkg). We need to tell OS X where to find the Qt framework. I added the following line in my .profile:

export DYLD_FRAMEWORK_PATH="/Developer/QtSDK/Desktop/Qt/473/gcc/lib:${DYLD_FRAMEWORK_PATH}"

Note that it is DYLD_FRAMEWORK_PATH, and not DYLD_LIBRARY_PATH.

Then, we can test that everything is working by trying

$ ipython qtconsole --pylab=inline

What’s new in IPython 0.11

No need to tell a long story because everything has been nicely summarized on Chris Fonnesbeck’s nice post: Innovations in iPython. However, just for the record, here are some of the new features:

I didn’t check whether the Emacs package was updated or not (I don’t think so), but I know there’s a VIM plugin now. I have to check how my old ipython.el is working with this new version of IPython.

Sidenote

In order to build PyQt4, I grabbed the PyQt-mac-gpl-4.8.4.tar.gz archive from Riverbank download page. We also need SIP. Then, I used the following commands. For SIP:

$ python configure.py -d /Library/Python/2.7/site-packages/
$ make 
$ sudo make install

And for PyQt:

$ python configure.py -k -d /Library/Python/2.7/site-packages/
$ make 
$ sudo make install

I got a lot of warnings saying that Lion was currently not supported during the compilation.

python

See Also

» Installing numpy+scipy on OS X Lion » Python for statistical computing » Bayesian analysis with Python » Python and significant indentation » Building R 2.12 and Python 3.1