Installing GDAL on Linux easily

Tue 02 September 2014

Filed under Blog

Tags python gdal linux

Installing GDAL and its Python bindings on Linux is typically quite easy, provided you are using Debian or Ubuntu, as they already have packages compiled for them. The packages are compiled so as to support a large number of different file formats. However, if you are using other Linux distributions, or if you don't have root access, installing GDAL (or compiling it locally) is fraught with difficulties. After a lot of pain on this, I think the best way to do this is to install the Anaconda Python distribution, and then install suitable conda packages with GDAL and dependencies linked in. This is easy and straightforward, and can be extended to MacOSX and to Windows (if someone figures out how to do it!).

For Linux, the process goes like this:

  1. Download the anaconda installer for your system from here

  2. Install somewhere (typically /opt/anaconda/, but up to you!)

  3. Add the Anaconda bin directory to your $PATH

  4. Install my Linux GDAL packages with

    conda install --yes -c https://conda.binstar.org/jgomezdans gdal=1.11.0
    

You should now be able to use the Python GDAL bindings, but also all the GDAL executables will be installed!


Comments


EO & DA Ramblings © J Gomez-Dans Powered by Pelican and Twitter Bootstrap. Icons by Font Awesome and Font Awesome More