Fork me on GitHub

Installing iPython under MacOS X

If you don’t know iPython by now:  check it out

It’s a pretty nice tool if you work with python from the terminal. Especially the easy way to get information about modules and functions. The easiest way to install (especially in a Mac environment) is to use the “alldeps” tarball.

deathstar-mac ~ $ wget http://ipython.scipy.org/dist/alldeps/ipython-alldeps-0.9.1.tar
deathstar-mac ~ $ tar xvf ipython-alldeps-0.9.1.tar
deathstar-mac ~ $ cd ipython-alldeps-0.9.1.tar
deathstar-mac ~ $ make

The default install location is ~/usr/local. You may change this by modifying the install scripts but for now use the default. Now it’s time to make some modifications to your profile. Add the following lines:

deathstar-mac ~ $ export PATH="$PATH:/Users/YOUR_USERNAME/usr/local/bin"
deathstar-mac ~ $ export PYTHONPATH=$PYTHONPATH:/Users/YOUR_USERNAME/usr/local/lib/python2.5/site-packages

Let’s complete the installation process:

deathstar-mac ~ $ iptest
deathstar-mac ~ $ cd ipython-alldeps-0.9.1/ipython-0.9.1
deathstar-mac ~ $ python setup.py install --prefix=~/usr/local
 
deathstar-mac ~ $ ipython
Leopard libedit detected.
Python 2.5.1 (r251:54863, Apr 15 2008, 22:57:26) 
Type "copyright", "credits" or "license" for more information.
 
IPython 0.9.1 -- An enhanced Interactive Python.
?         -> Introduction and overview of IPython's features.
%quickref -> Quick reference.
help      -> Python's own help system.
object?   -> Details about 'object'. ?object also works, ?? prints more.
 
In [1]:

Enjoy!

Leave a Reply

 

 

 

You can use these HTML tags

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre lang="" line="" escaped="">

Comment Spam Protection by WP-SpamFree