Created
October 6, 2017 02:46
-
-
Save nitrag/e5b18f2fe5950e52fc286cf77d57d41d to your computer and use it in GitHub Desktop.
Install GDAL on OSX (virtualenv)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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