Serge Rey <[email protected]>
2013-06-21
Below I explain how to set up an Anaconda environment that isolates the new dependencies required for the scipy13 tutorial.
The installation is done on OS X 10.8.4.
- Download Anaconda
Get the 64bit version cd ~/Downloads
bash <Downloaded file>
During this accept all the defaults and sayyes
when it asks to prepend anaconda to your PATH variable in your .bashrccd
source .bashrc
ipython
- You should see ipython fire up with info that it is part of Anaconda 1.X or so
- Quit python and get back to the terminal.
conda create -n scipygis scikit-learn
I am using scikit-learn as a departure point for some of the core dependencies (numpy, scipy, etc)- Install
setuptools
into this env- Download setuptools
tar xzvf setuptools-0.7.4.tar.gz
cd setuptools-0.7.4
~/anaconda/envs/scipygis/bin/python setup.py install
- Install
pip
- Download pip
tar xzvf pip-1.3.1.tar.gz
cd pip-1.3.1
~/anaconda/envs/scipygis/bin/python setup.py install
These will get the GDAL and GEOS frameworks installed. If you already have installed these as part of getting QGIS on the Mac up and running, you won't need to reinstall. If so skip to the next section.
- Download GDAL Framework
- Open the dmg.
- Double click the
GDAL Complete.pkg
file and install.
- Download gdal
cd ~/Downloads
tar xzvf GDAL-1.9.1.tar.gz
cd GDAL-1.9.1
~/anaconda/envs/scipygis/bin/python setup.py build_ext -I/Library/Frameworks/GDAL.framework/Versions/1.9/unix/include -L/Library/Frameworks/GDAL.framework/Versions/1.9/unix/lib -lgdal install
git clone git://github.com/Toblerity/Fiona.git
cd Fiona
~/anaconda/envs/scipygis/bin/python setup.py build_ext -I/Library/Frameworks/GDAL.framework/Versions/1.9/unix/include -L/Library/Frameworks/GDAL.framework/Versions/1.9/unix/lib -lgdal install
- Download basemap
tar xzvf basemap-1.0.6.tar.gz
cd basemap-1.0.6
export GEOS_DIR=/Library/Frameworks/GEOS.framework/unix
~/anaconda/envs/scipygis/bin/python setup.py install
All other dependencies were installed with:
~/anaconda/envs/scipygis/bin/pip install <package>
The only exception to this is cartopy which I could not get installed within the Anaconda env. I didn't want to go the brew route so I left it out since the testing script passes.