pygdal
Virtualenv and setuptools friendly version of standard GDAL python bindings
What it is and what it does
pygdal is a wrapper around GDAL's standard Python bindings designed to work smoothly in virtualenvs and with setuptools. Unlike the standard GDAL bindings, pygdal handles the build and installation process in isolated Python environments, though it still requires the GDAL library and headers to be installed on your system first. It lets you work with geospatial raster and vector data—reading, writing, and transforming geographic datasets—using the standard bindings API.
The main constraint is version coupling: your installed pygdal package version must match your system GDAL version exactly. This tight binding ensures the Python bindings align with the underlying C/C++ library, but it also means you need to verify your GDAL version before installing and potentially reinstall pygdal if you upgrade GDAL. The package supports Python 3.6 and later and is marked Production/Stable, though its last release was in May 2023.
Use it for:
- Reading and writing GIS raster and vector data formats in a virtualenv.
- Automating geospatial data processing pipelines that need isolated Python dependencies.
- Developing GIS applications where system GDAL is already installed and you need Python bindings.
- Prototyping geospatial analysis without polluting your system Python installation.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Provides Python bindings for GDAL (Geospatial Data Abstraction Library) in a virtualenv-friendly package that wraps the system GDAL installation.
Yes, if you already have GDAL installed on your system and need Python bindings in a virtualenv. The high install friction (version-matching requirement, compiled dependencies) and aging maintenance status (last release May 2023) are acceptable trade-offs for established GIS work. Not recommended if you're new to GDAL or prefer minimal system-level dependencies.
Install
pygdal on PyPI
pip
pip install pygdaluv
uv add pygdalpoetry
poetry add pygdalInstalling pygdal
Before you install
Installation requires system-level GDAL library and headers already present; the package version must match your installed GDAL version exactly. High friction due to compiled C/C++ dependencies and version coupling, though the repository remains active and the package is marked Production/Stable.
License in practice
MIT license permits commercial and private use with minimal restrictions, making it suitable for most projects without legal concern.
Quickstart
# Requires system GDAL library installed first
# Install matching pygdal version for your GDAL:
# $ gdal-config --version
# $ pip install pygdal=="`gdal-config --version`.*"
from osgeo import gdal
System GDAL library and development headers must be installed before pip install; pygdal version must match your system GDAL version exactly.
Verify before relying
- Whether numpy is automatically installed as a dependency or requires separate setup.
- Current maintenance cadence and whether aging status reflects planned dormancy or active-but-stable development.
- Compatibility with GDAL versions beyond 3.5.2 (the stated upper bound in the description).
Package facts
| License | MIT (permissive) |
| Python support | supports the current Python release (>=3.6) |
| Install friction | high — source build required |
| Runtime dependencies | none |
| Maintenance | aging — 1,184 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 133,557/month — #11,506 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: pygdal-3.6.4.11.tar.gz
Tags
More Information Analysis packages
A drop-in replacement for Python's standard…
permissive · top 100 on PyPI
pyarrowpyarrow provides Python bindings to Apache…
permissive · top 100 on PyPI
networkxNetworkX provides data structures and…
permissive · top 1,000 on PyPI
snowflake-connector-pythonConnects Python applications to Snowflake data…
permissive · top 1,000 on PyPI
contourpyContourPy calculates contours of 2D…
permissive · top 1,000 on PyPI
snowflake-snowpark-pythonSnowpark Python provides APIs to query and…
permissive · top 1,000 on PyPI
GDALGDAL provides Python bindings to read, write,…
permissive · top 15,000 on PyPI
virtualenv-cloneClones an existing Python virtualenv to a new…
permissive · top 5,000 on PyPI
rpmProvides access to system RPM Python bindings…
permissive · top 15,000 on PyPI
setuptools-gitA setuptools plugin that automatically includes…
permissive · top 15,000 on PyPI
pipenvPipenv automates Python virtual environment…
permissive · top 1,000 on PyPI
virtualenvvirtualenv creates isolated Python environments…
permissive · top 100 on PyPI
pyogrioPyogrio provides fast, bulk-oriented read and…
permissive · top 5,000 on PyPI
selinuxProvides a pure-Python shim for the selinux…
permissive · top 5,000 on PyPI
fionaFiona reads and writes vector GIS data…
permissive · top 5,000 on PyPI