[gdal-dev] Minimum python version?

Kurt Schwehr schwehr at gmail.com
Tue Jun 13 10:22:26 PDT 2023


Hi all,

What is the minimum python version for the GDAL python bindings? This is
the only thing I found easily:

find . -type f | grep -v git | xargs grep 3 | grep python_version

cat autotest/requirements.txt
pytest>=6.0.0
pytest-sugar<=0.9.6; python_version < '3.7'
pytest-sugar; python_version >= '3.7'
pytest-env
lxml
jsonschema
filelock

I think the real answer is that it's 3.8 from what I see here:

swig/python/osgeo/__init__.py

# The following is a Sequence of tuples in the form of (gdal_version,
python_version).
# Each line represents the minimum supported Python version of a given GDAL
version.
# Introducing a new line for the next GDAL version will trigger a
deprecation warning
# when importing osgeo from a Python version which will not be
# supported in the next version of GDAL.
gdal_version_and_min_supported_python_version = (
    ((0, 0), (0, 0)),
    ((1, 0), (2, 0)),
    ((2, 0), (2, 7)),
    ((3, 3), (3, 6)),
    # ((3, 4), (3, 7)),
    # ((3, 5), (3, 8)),
)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20230613/d78c8aa3/attachment.htm>


More information about the gdal-dev mailing list