Wednesday, November 12, 2014

Is Fiona being difficult?

I had installation problems with fiona. I tried first the easy route :

$ brew install gdal
$ pip install fiona

BUT, installing fiona could not find the gdal library. So, I tried the alternative route

$ git clone git://
$ cd Fiona
$ python build_ext -I/path/to/gdal/include -L/path/to/gdal/lib -lgdal ins
I had installed the Kyngchaos pre-built version of GDAL previously, so this had placed the headers and libs in the wrong place. So I added them in to the -I and -L arguments...should work, but it did not....still not.

Then, I chanced upon the reason. My PATH contained the link to the kyngchaos location (/Library/Frameworks/GDAL.framework/Programs), and this seemed to override all the arguments (-I & -L). So, I removed it from my path and added the expected location usr/local/bin (where brew places the gdal-config file). And it worked.....