Random Installation Notes

(These are mostly intended for students that need to install the same software.)

How to get gfortran working with MATLAB 2009a on mac osX 10.6

Simply follow these instructions:


How to install pycppad on mac os X Leopard

(Hours it took to discover all this: 8ish.  Frustration level: 9/10)

1)  Install boost.

Download the file boost_1_40_0.tar.bz2 (or .zip or .tar.gz), extract it, enter the directory.

2) Compile boost.python with a flag to ensure a universal binary.

sudo ./bootstrap
sudo ./bjam install --architecture=combined --with-python

3) Download the file pycppad-20090621.tar.gz, unzip it, enter the directory.

4) Make sure you have the wget utility installed (“port install wget” if you use macports)

5) Make the changes

#boost_python_lib_dir = '/usr/lib'
boost_python_lib_dir = '/usr/local/lib'
#boost_python_lib_name  = 'libboost_python.so'
boost_python_lib_name  = 'libboost_python.a'
#cppad_version     = '20090303.0'
cppad_version     = '20090915'
#m = re.search('lib([a-zA-Z0-9_-]+)[.]so', boost_python_lib_name)
m = re.search('lib([a-zA-Z0-9_-]+)[.]a', boost_python_lib_name)
cppad_extension_include_dirs.append( cppad_include_dir ) # DO NOT COMMENT OUT
cppad_extension_include_dirs.append( '/Users/Justin/boost_1_40_0')

The last line will be different unless you so fortunate as to also be named Justin.

6) install pycppad

./setup.py build_ext --inplace
./sudo python setup.py install --prefix=/usr/local

7) copy the files from where this installs them to where they actually need to be

cp -r /usr/local/lib/python2.6/site-packages/pycppad /Library/Frameworks/Python.framework/Versions/Current/lib/python2.6/site-packages/

This is also likely to be different for you.  If pycppad only works in the pycppad directory, it is likely you need to change this step.

7) test pycppad

python test_more.py

Absolutely everything went wrong when I tried to do this.

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 )

Google+ photo

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

Connecting to %s