Locked History Actions


Migrate to Enthought Canopy Python Distribution

Mac OS X (Mountain Lion 10.8.5)

Register for academic account at enthought.com and download and install full canopy release.

I don't want to use their python editor, so follow these instructions, with:

/Applications/Canopy.app/Contents/MacOS/Canopy_cli setup ~/canopy --default

The --default option adds some stuff at the end of my ~/.profile that assumes you are using (ba)sh, and does not work with (t)csh. I decided to bite the bullet and change my default shell from tcsh to bash. Finally, fire up a new bash shell and check that we are using their distribution:

> which python

Since this is a new distribution, packages previously installed by hand are no longer available and need to be re-installed. The canopy packages are listed here and include the galsim prereqs (numpy,pyfits,yaml). I still need to re-install pyds9 and galsim. I'm not sure how scons interacts with canopy, but it still seems to work after updating to canopy. DS9 is straightforward:

cd .../pyds9-1.7
python setup.py install

GalSim is harder since boost-python needs to be built against the new python distribution. I might as well update boost and galsim at this point. First, boost (see galsim instructions):

sudo rm /usr/local/lib/libboost_*
sudo rm -rf /usr/local/include/boost
tar -zxf ~/Downloads/boost_1_55_0.tar.gz
cd boost_1_55_0
./bootstrap.sh --with-python=/Users/david/canopy/bin/python --with-python-root=/Users/david/canopy
./b2 link=shared
sudo ./b2 --prefix=/usr/local/ link=shared install

Next galsim:

cd .../GalSim
git pull origin master
scons -c
scons test
sudo scons install