I download GDAL 3.3.2(with compiler MSVC 2019) from here. I have downloaded the following components and install them in windows 10 x64:
- gdal-303-1928-x64-core.msi
- GDAL-3.3.2.win-amd64-py3.9.msi
- gdal-303-1928-x64-mrsid.msi
- gdal-303-1928-x64-ecw-55.msi
- and python-3.9.7-amd64
The environment variables are as the follow:
GDAL_DATA
=C:\Program Files\GDAL\gdal-data
GDAL_DRIVER_PATH
=C:\Program Files\GDAL\gdalplugins
USE_PATH_FOR_GDAL_PYTHON
=YES
path
=...;C:\Program Files\GDAL;
When I run gdal2tiles.py -z 12-13 sample.tif /tiles
the output is as follow:
ERROR 1: Can't load requested DLL: C:\Program Files\GDAL\gdalplugins\gdal_GEOR.dll
126: The specified module could not be found.
ERROR 1: Can't load requested DLL: C:\Program Files\GDAL\gdalplugins\gdal_GEOR.dll
126: The specified module could not be found.
ERROR 1: Can't load requested DLL: C:\Program Files\GDAL\gdalplugins\gdal_MrSID.dll
126: The specified module could not be found.
ERROR 1: Can't load requested DLL: C:\Program Files\GDAL\gdalplugins\gdal_MrSID.dll
126: The specified module could not be found.
ERROR 1: Can't load requested DLL: C:\Program Files\GDAL\gdalplugins\ogr_MSSQLSpatial.dll
126: The specified module could not be found.
ERROR 1: Can't load requested DLL: C:\Program Files\GDAL\gdalplugins\ogr_MSSQLSpatial.dll
126: The specified module could not be found.
ERROR 1: Can't load requested DLL: C:\Program Files\GDAL\gdalplugins\ogr_OCI.dll
126: The specified module could not be found.
ERROR 1: Can't load requested DLL: C:\Program Files\GDAL\gdalplugins\ogr_OCI.dll
126: The specified module could not be found.
Traceback (most recent call last):
File "C:\Program Files\GDAL\gdal2tiles.py", line 5, in <module>
from osgeo_utils.gdal2tiles import * # noqa
File "C:\Users\Internet\AppData\Local\Programs\Python\Python39\lib\site-packages\osgeo_utils\gdal2tiles.py", line 58, in <module>
from osgeo import gdal
File "C:\Users\Internet\AppData\Local\Programs\Python\Python39\lib\site-packages\osgeo\gdal.py", line 1920, in <module>
import ogr
ModuleNotFoundError: No module named 'ogr'
In C:\Program Files\GDAL\gdalplugins\
exist all gdal_GEOR.dll
, gdal_MrSID.dll
, ogr_MSSQLSpatial.dll
, ogr_OCI.dll
files, and In C:\Program Files\GDAL
exist the gdal2tiles.py
file. What's the problem?
ogrinfo --version
ERROR 1: Can't load requested DLL: C:\Program Files\GDAL\gdalplugins\gdal_MrSID.dll ... GDAL 3.3.2, released 2021/09/01
pip install
the wheel (but I am unsure if you still need an internet connection to pip install a local file).