Python 3.6, Django 1.11, Windows 10, Gdal 2.2.4 not working

by Tusk   Last Updated July 05, 2018 11:22 AM

I've been trying to find a solution to this issue, but couldn't find anything. I've installed OS4GEOW using the Django Docs

But I get the following error: File "C:\Python36\lib\site-packages\django\contrib\gis\gdal\libgdal.py", line 49, in <module> lgdal = CDLL(lib_path) File "C:\Python36\lib\ctypes\__init__.py", line 348, in __init__ self._handle = _dlopen(self._name, mode) OSError: [WinError 127] The specified procedure could not be found

I've modified the C:\Python36\lib\site-packages\django\contrib\gis\gdal\libgdal.py file, so it contains this line: lib_names = [str('gdal201'), str('gdal202'), str('gdal111'), str('gdal110'), str('gdal19')]

instead of:

lib_names = [str('gdal201'), str('gdal20'), str('gdal111'), str('gdal110'), str('gdal19')]

gdalinfo --version returns: GDAL 2.2.4, released 2018/03/19

I also have GDAL=="2.2.4" python package installed.

My path contains: C:\Python36\Scripts\ C:\Python36\ C:\OSGeo4W\bin

My C:\OSGeo4W\bin folder contains gdal202.dll which in details says 2.2.4 version.

But it still doesn't run, would be glad for anykind of pointers/help because I'm kind of lost with GDAL Python 3.6 combo.



Related Questions


python/django/geodjango on Windows or Linux?

Updated August 21, 2018 16:22 PM

geodjango raster add raster errors

Updated June 21, 2018 20:22 PM

Mapscript with Python 3

Updated May 24, 2017 04:22 AM

gdal ImportError in python on Windows

Updated April 19, 2015 20:09 PM

How to install GDAL with Python on windows?

Updated July 28, 2015 13:09 PM