Install GDAL in Windows

This recipe shows how to install gdal in your Windows Environment

Prerequisites

To run this code you need:
  • A running Python 3.x Environment

  • Know if your computer is 32 bit or 64 bit

Recipe

Often GDAL is a very important library to manipulate satellite data.

Note

You can find the architecture of your PC going in: Settings -> System -> About

To install GDAL:

Note

A sample is: GDAL-3.9.2-cp312-cp312-win_amd64.whl GDAL-3.9.2: means gdal version 3.9.2 cp312-cp312: means build for python 3.12 win_amd64: means a 64 bit windows

You can find the version of gdal you need for your python version.

  • Download GDAL wheel, in this tutorial we will assume GDAL-3.9.2-cp312-cp312-win_amd64.whl

  • Open your python environment

  • Install the wheel:

pip install "C:\Users\YOUR_USER\Downloads\GDAL-3.9.2-cp312-cp312-win_amd64.whl"

Now, you should be able to import gdal in your code.

from osgeo import gdal