Installing GDAL with Anaconda

GeoSense ✅
GeoSenses
Published in
1 min readMay 20, 2024

--

If you don’t know how to install GDAL on Windows or Linux, please follow the steps below.

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.9.0, released 2024/05/07

To test python bindings:

from osgeo import gdal
print(gdal.__version__)
3.8.1e

Thanks for reading!!!

--

--

GeoSense ✅
GeoSenses

🌏 Remote sensing | 🛰️ Geographic Information Systems (GIS) | ℹ️ https://www.tnmthai.com/medium