[osgeo4w-dev] [osgeo4w] #599: gdal204.dll not loading win10 amd64 python 3.7.1, django 2.1.7

OSGeo4W trac_osgeo4w at osgeo.org
Sun Mar 17 08:30:00 PDT 2019

#599: gdal204.dll not loading win10 amd64 python 3.7.1, django 2.1.7
Reporter:  rhaimann      |      Owner:  osgeo4w-dev@…
    Type:  defect        |     Status:  new
Priority:  major         |  Component:  Package
 Version:                |   Keywords:  OSGeo4W, gdal204, WinError, Django,
                         |  Python
 Loaded OSGeo4W64 on Windows 10 AMD 64 machine running Python 3.7.1 Django
 2.1.7. Could not load gdal204.dll. The file name was being read correctly.
 Updated lib_names in lidgdal.py to include gdal204 and gdal203 ( lib_names
 = ['gdal204','gdal203','gdal202', 'gdal201', 'gdal20', 'gdal111',
 'gdal110', 'gdal19']). In settings.py set GDAL_LIBRARY_PATH  to point to
 the full path for gdal204. Put in a print statements in __init__.py for
 self.__name, the path and filename were being read. Python kept throwing
 an error, from the Windows OS either WinError 126 or WinError 127
 depending on how I had the paths set up. Put in an entirely fresh virtual
 environment. Deleted earlier versions of Python before doing so. Same
 errors kept being thrown.

 Changed the GDAL_LIBRARY_PATH to point to gdal111 that was included in the
 install. This stopped throwing the error so the Django server would start.

 There seems to be some issue with the compile of gdal204.dll. While the
 file is read, internal functions seem to be not finding something that is
 being called. No further detail is provided in the error message. Rather
 than recompiling the source under MS C++ 2017, going to move forward with
 gdal111.dll for now. Not entirely sure what the issue is.

 Hope this helps.

Ticket URL: <https://trac.osgeo.org/osgeo4w/ticket/599>
OSGeo4W <http://trac.osgeo.org/osgeo4w>
OSGeo4W is the Windows installer and package environment for the OSGeo stack.

More information about the osgeo4w-dev mailing list