Search code examples
pythongdal

Installing GDAL on Ubuntu


I am not able to install gdal on Ubuntu using latest anaconda for python 3.6 How do I fix it? I get foll. error:

UnsatisfiableError: The following specifications were found to be in conflict:
  - gdal -> numpy 1.8* -> python 2.6* -> openssl 1.0.1*
  - python 3.6*
Use "conda info <package>" to see the dependencies for each package.

Solution

  • It seems that you try to install gdal with python 2.6 while your anaconda is python 3.6.

    To install gdal (or any package) with a specific python version, create a conda environment:

    $ conda create -n <myenvname> python=<version>
    

    then activate the environment:

    $ source activate <myenvname>
    

    and then, install gdal:

    $ conda install gdal