Compiling ipython for Cloud Computing Fun

So ipython now has a powerful cloud computing environment built into it. Python is becoming a very common cloud computing platform. It is seen in Amazon’s compute cloud, and the Google App Engine is purely Python.

Also notably, it seems that future versions of Ubuntu will ship with such capabilities!

This post will hopefully tell you everything you need to install similar capabilities and build a cloud of your own using ipython!

Installation on Ubuntu Gusty/Hardy/Intrepid:

First you need to get the various code bits that python modules will depend on:

$sudo apt-get install libssl-dev python-setuptools

This will install both the openssl crpytography libraries and the “easy_install” tool, that makes getting and updating python modules really effortless. There is an ongoing battle between this utility and “pip“, but that discussion is well beyond the scope of our post today. I perfer easy_install becuase it is exactly what is advertises.

Next up, we “easy_install” everything we need that ipython’s parallel capabilities will depend on:

$sudo easy_install foolscap nose pexpect pyopenssl sphinx

Depending on what you already have installed, this may take some time.

There are a lot of dependencies to ipython, so to make sure we got them all right, we grab the current ipython source:

$mkdir ipython_build
$cd ipython_build
$wget http://ipython.scipy.org/dist/ipython-0.9.1.tar.gz
$tar xfz ipython-0.9.1.tar.gz
$cd ipython-0.9.1
$./setup.py config

At this point ought to see something like:

Zope.Interface: yes
Twisted: 8.1.0
Foolscap: 0.3.2
OpenSSL: 0.8
sphinx: 0.5.1
pygments: 1.0
nose: 0.10.4
pexpect: 2.1

If you are missing something essential to ipython’s build, it will let you know :p Now that we know we have everything necessary we can go ahead with either the typical build/install whatnot from this source directory, or simply:

$cd ../..
$rm -rf ipython_build
$sudo easy_install -U ipython

And you should be all set to go!

Under *nix distros the following is a good test as to whether everything is functioning properly:

$ipcluster -n 4

Based on what I have seen the OSX / Windows install ought to be fairly similar. You might have to grab the openssl source and compile pyopenssl on you own, pointing the linker to the right directories. If anyone has any luck doing this in OSX / Windows, let me know and I’ll post an update. Some links that might be helpful ( foolscap nose pexpect pyopenssl sphinx openssl-source)

Advertisement

~ by meawoppl on March 3, 2009.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s

 
Follow

Get every new post delivered to your Inbox.