Installing IPython on OS X

With my recent python education, I have reached a point where the python interpreter in interactive mode isn’t meeting my needs anymore.

After looking around for alternatives, it looks like IPython will be a good upgrade. But one problem, the installation documentation was way too verbose and complex, so I’ve tried to simplify it here:

1. Install readline — you need readline to use all the fancy command line edit features, like advanced history and auto completion. You need to install a new version because apparently the version shipped with OS X will not work properly with IPython. Luckily for you there is already a pre-built version for download and you just need to put in /Library/Python/2.5/site-packages.

  1. $ cd /Library/Python/2.5/site-packages
  2. $ curl -O http://ipython.scipy.org/dist/readline-2.5.1-py2.5-macosx-10.5-i386.egg

2. Install IPython — Obviously, you’ll need to build and install this, luckily it is not hard.

  1. $ curl -O http://ipython.scipy.org/dist/ipython-0.8.4.tar.gz
  2. $ tar -xvzf ipython-0.8.4.tar.gz
  3. $ cd ipython-0.8.4
  4. $ python setup.py build
  5. $ sudo python setup.py install
  6. password:

Now if you are like me, you may wonder what just happened, run the following commands to check out the installation:

  1. $ ls -l /Library/Python2.5/site-packages | grep -i ipython
  2. $ ls -l /usr/local/bin/ipython
  3. $ ls -l /usr/local/bin/irunner
  4. $ ls -l /usr/local/bin/pycolor
  5. $ ls -l /System/Library/Frameworks/Python.framework/Versions/2.5/share/doc/ipython
  6. $ ls -lrt /System/Library/Frameworks/Python.framework/Versions/2.5/share/man/man1

Finally go test it out and have fun:

  1. $ ipython

For more information view the Official IPython Documentation.

blog comments powered by Disqus