Migrating to Python from Matlab

Post date: Apr 29, 2009 2:59:48 PM

Getting Python to work with libraries required for my research

I had some difficulties to install Python stuff to run everything needed to plot and compute stuff for my research.

Although everything is well explained on this post:

http://vnoel.wordpress.com/2008/05/03/bye-matlab-hello-python-thanks-sage/

If the url is not valid, I kept a copy here just in case.

Basemap didn't work from the Mac OS native distribution of Python.

I found that moving the content of :

/Library/Python/2.5/site-packages/matplotlib-0.98.6svn-py2.5-macosx-10.3-i386.egg/mpl_toolkits

to something like:

/Library/Python/2.5/site-packages/matplotlib-0.98.6svn-py2.5-macosx-10.3-i386.egg/mpl_toolkits_off

then:

- installing py-matplotib, py-matplotib-basename and pyproj packages from MacPort

- adding /opt/local/lib/python2.5/site-packages to the environment variable PYTHONPATH

solved the problem for my config.

Not working:

http://www.scipy.org/

http://py-scipy.darwinports.com/

http://py-matplotlib.darwinports.com/

Works:

Mac OS X binaries from svn by Chris Fonnesbeck: http://macinscience.org

Make sure you are using OSX 10.5 Leopard's preinstalled Python 2.5.1, ActivePython 2.5 or MacPython 2.5. Note: The Superpack's version detection may fail with other Python distributions (e.g., fink, Darwin Ports), and it will refuse to install.

Download the SciPy Superpack for Python 2.5

NumPy is included in the Superpack. For best compatibility, make sure you use the version in the Superpack.

Note that the Chris Fonnesbeck's Superpacks are based on recent SVN code, and not the latest official release.