Back to Scott Davey

Installing GDAL and QGIS on OSX Yosemite

Posted 2 January 2015 by Scott Davey (Scott Davey)

For those of you working on geospatial datasets, if you're like me then your go-to tools will be QGIS and GDAL.

Here's my latest homebrew setup for these tools, on a freshly built OSX Yosemite running 10.10.1.



  1. I'll assume you already have Homebrew installed and working, you know how to use it, you've run "brew update", and "brew doctor" reports everything is okay.
  2. Install Homebrew's MySQL 5.6 if you need that support
  3. If you have previous versions of these tools installed via homebrew, then obviously uninstall them

Installing GDAL 1.11

In my line of work, I specifically need support for the following formats: MySQL, OpenFileGDB, KML, ESRI Shapefile, MapInfo File, GeoRSS. It used to have a whole lot of work, but now it's now as simple as this one-liner:

brew install gdal --enable-unsupported --with-libkml --with-mysql

Run this command to verify your formats are available:

ogr2ogr --formats 


Installing QGIS 2.6

I decided to use the Homebrew QGIS version rather than the (excellent) Kyngchaos distribution. I did this because I found MySQL support tends to be missing from his GDAL build, and its QGIS build relies on its version of GDAL.

# Install X11
brew install Caskroom/cask/xquartz
# here's the big trick to success: 
# set up python with dependencies for QGIS 
# and export its path before the QGIS build so it can find it
export PYTHONPATH=/usr/local/lib/python2.7/site-packages:$PYTHONPATH
pip install numpy scipy matplotlib processing psycopg2
# Install QGIS
brew tap osgeo/osgeo4mac
brew install qgis-26
# Finally, add an icon into /Applications
brew linkapps qgis-26

Warning, this takes a bunch of time so go grab lunch.




Tags: ,


  1. Scott said on 16:19 Sunday 4 Jan, 2015

    [ +50 ] Hi Luigi,

    I haven't used the intergraph plugin myself but the following page explains how to build it from source:

    I haven't checked and it may be in a brew somewhere, but the beauty of brew is that it's actually compiling software from source, so you can mix and match brew install commands with manual builds such as this.

    I'd try building ECW following the link above with a prefix of /usr/local, and then reinstall gdal with the --with-ecw flag.

    Good luck, and thanks for visiting.

    Like Dislike Report Abuse
  2. Luigi Mollica said on 5:40 Sunday 4 Jan, 2015

    [ +44 ] Hi Scott,

    I appreciated your work very much, you saved my day with your instructions, because they are very clear and easy to follow! Thank to you, I have a working installation of QGIS on my Macbook Pro.

    I have a question: how can I install the plugins needed to manage ECW files from Intergraph? In the Kyngchaos porting page ( he tells to download and use certain plugins from Intergraph but I suspect his instructions are related to his GDAL+QGIS packages - can you please tell me if it is going to work on the package I set up using home-brew? There are differences in plugin paths or something else I should do?

    Best regards and thank you for your work!


    Like Dislike Report Abuse

Post a comment

Please be considerate and respectful in your comments.