Twitter Facebook Pinterest RSS

Installing a complete, interactive scientific python environment.

A small guide to have all the interactive goodness of ipython, wrapped in a nice qt backend.
Tested on osx 10.8 and super easy to install.
The first step is to install epd free python distribution, which is a well maintained  distro with most of the basic scientific packages.
The cool thing is that once installed you will able to add even more modules with easy easy commands.

Let's start: 
  • Download EPD free   http://www.enthought.com/products/epd_free.php
  • check your .bash_profile  
  • Giulios-MacBook-Air:~ Giulio$ more .bash_profile
    export EDITOR='sublime -w'
    # PYTHON SETTINGS
    # old stuff export PATH=/usr/local/bin:$PATH
    # export PATH=/usr/local/share/python:$PATH
    # export PYTHONPATH=/usr/local/lib/python:$PYTHONPATH
    # Setting PATH for EPD_free-7.3-2
    # The orginal version is saved in .bash_profile.pysave
    PATH="/Library/Frameworks/Python.framework/Versions/Current/bin:${PATH}"
    export PATH
    view raw gistfile1.sh hosted with ❤ by GitHub

  • If it looks like that or very similar (the last 2 lines are important) go head if not, comment or delete other lines pointing to python in some way (be careful, if you need them).
  • Install pip to the epd python you will super user permission 1    
  • Check that the path where pip is installed is the right one, and check the modules version, if you want update them:
  • Giulios-MacBook-Air:~ Giulio$ pip --version
    pip 1.2.1 from /Library/Frameworks/Python.framework/Versions/7.3/lib/python2.7/site-packages/pip-1.2.1-py2.7.egg (python 2.7)
    Giulios-MacBook-Air:~ Giulio$ pip freeze
    EPD==7.3
    Examples==7.3 # list goes on check the version you have.
    #WARNING ASKS NO CONFIRMATION
    Giulios-MacBook-Air:~ Giulio$ sudo pip install --upgrade module
    #WARNING ASKS NO CONFIRMATION
    view raw gistfile1.sh hosted with ❤ by GitHub
  • Also, now you can extend easily your python modules with:
    Giulios-MacBook-Air:~ Giulio$ sudo pip install panda # random module
    Downloading/unpacking panda # then a lot more logging..
    view raw gistfile1.sh hosted with ❤ by GitHub
  • Download Qt 4.7.4 libraries and PySide libraries
  • Install the .pkg files
  • Now you are ready to rock the qt console:
    ipython qtconsole --pylab=inline
  • Try this small program:
    plot(randn(100),rand(100),'ro--',alpha=0.2)
    Out[3]: [<matplotlib.lines.Line2D at 0x484ee50>]
    view raw gistfile1.py hosted with ❤ by GitHub
  • You will get this:


Ready to rock. Open a cold beer!

Now, there is no easy way to backup your installed modules. But you can sim-link  to dropbox if it is large enough. I have yet to try that approach, though.

Let me know if it works for you.



1. [Why, super user? because the default epd installation is in the library folder,good or bad it's up to you. But I like to have it installed there.]