I'm trying to install GDAL on a Mac (macos 10.12.2). I downloaded the GDAL 2.1 Complete package from http://www.kyngchaos.com/software/frameworks (which installs GDAL 2.1.2), and successfully ran the installer. Now I'm trying to compile the Python bindings, using
pip. In my bash_profile, I added lines for include paths (where the GDAL installer put them):
export CPLUS_INCLUDE_PATH=/Library/Frameworks/GDAL.framework/Versions/2.1/Headers export C_INCLUDE_PATH==/Library/Frameworks/GDAL.framework/Versions/2.1/Headers export LIBRARY_PATH=/Library/Frameworks/GDAL.framework/Versions/2.1/unix/lib
then I tried to compile the bindings with:
pip install gdal==2.1.2
but pip complained it could only find versions up to 2.1.0 ("No matching distribution found for gdal==2.1.2"). So I tried using 2.1.0 for the install:
pip install gdal==2.1.0
which got pip to attempt the install, but which eventually failed with:
fatal error: 'gdal.h' file not found #include "gdal.h" ^ 2 warnings and 1 error generated. error: command '/usr/bin/clang' failed with exit status 1
Yet, the file gdal.h is located in the Header directory I set for my include paths.
I tried the advice given in the following questions:
Python GDAL package missing header file when installing via pip
Install GDAL python package in virtualenv on mac
but it did not fix my problem.
What should I do next?
osgeomodule (part of GDAL complete), the shell reported it as not found, which seemed to confirm that it was not bound to Python.