Skip to content

Instantly share code, notes, and snippets.

@jeremejazz
Last active January 16, 2022 03:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jeremejazz/02ea7626ec12a39a789f44db4a9ec49c to your computer and use it in GitHub Desktop.
Save jeremejazz/02ea7626ec12a39a789f44db4a9ec49c to your computer and use it in GitHub Desktop.
Installing Gdal with Anaconda

Installing GDAL with Anaconda

Here are steps to install GDAL in Anaconda with python bindings.

  1. Download and Install Anaconda (or Miniconda for minimal setup) For Windows a shortcut to anaconda prompt will be created in the start menu which should open command prompt with conda activated. In Linux you will be asked to make conda automatically start whenever bash starts. You can also activate it manually.
  2. (Optional. You can skip this if you want to only use base) Create a Conda environment with python.
conda create -n geospatial python=3.9

To list environments

conda env list 

To activate an environment

conda activate geospatial
  1. Install GDAL
conda install -c conda-forge gdal
  1. Test your installation
gdalinfo --version 

Should output something like this

GDAL 3.4.1, released 2021/12/27

To test python bindings:

from osgeo import gdal
print(gdal.__version__)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment