remicres / otbtf

Deep learning with otb (mirror of https://forgemia.inra.fr/orfeo-toolbox/otbtf)
Apache License 2.0
161 stars 39 forks source link

No more "import gdal" when >= 3.3 #71

Closed vidlb closed 2 years ago

vidlb commented 2 years ago

File gdal.py file was removed in GDAL 3.3 :

Traceback (most recent call last):
  File "./python/otbtf.py", line 31, in <module>
    import gdal
ModuleNotFoundError: No module named 'gdal'

As in old GDAL releases, it is required to use

from osgeo import gdal

It is backward compatible.

Not a problem when using Ubuntu's 20.04 default GDAL release (as in Dockerfile), but 3.3 is now default in most distrib (OTB Superbuild, future Ubuntu LTS...), or when using ubuntu-gis PPA.

remicres commented 2 years ago

fixed in Release 3.2.1