Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Install GDAL on OSX (virtualenv)
# what a headache!
# 10-05-2017
# FIRST!
# Install kyngchaos 1.11 complete:
# http://www.kyngchaos.com/software/frameworks
# Go into your folder where your virtualenv lives and activate
source bin/activate
# Build in tmp?
cd /tmp
pip download GDAL==1.11.2 (or whichever version you want)
tar -zxvf GDAL-1.11.2.tar.gz
cd GDAL-1.11.2
export CFLAGS=-Qunused-arguments export CPPFLAGS=-Qunused-arguments
python setup.py build_ext\
--gdal-config=/Library/Frameworks/GDAL.framework/Versions/1.11/unix/bin/gdal-config\
--library-dirs=/Library/Frameworks/GDAL.framework/Versions/1.11/unix/lib/\
--include-dirs=/Library/Frameworks/GDAL.framework/Versions/1.11/Headers/
# Build and install:
python setup.py build
python setup.py install
# Test
cd /back/to/project
python manage.py runserver
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.