Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SHELL

Is GDAL installed? If it is, try setting GDAL_LIBRARY_PATH in your settings.

Got this solution from stackoverflow. 

I got same error.

django.core.exceptions.ImproperlyConfigured: Could not find the GDAL library (tried "gdal204", "gdal203", "gdal202", "gdal201", "gdal20"). Is GDAL installed? If it is, try setting GDAL_LIBRARY_PATH in your settings.
First, insall OSGeo4W , and then add following code in your settings.py.

import os
if os.name == 'nt':
    import platform
    OSGEO4W = r"C:OSGeo4W"
    if '64' in platform.architecture()[0]:
        OSGEO4W += "64"
    assert os.path.isdir(OSGEO4W), "Directory does not exist: " + OSGEO4W
    os.environ['OSGEO4W_ROOT'] = OSGEO4W
    os.environ['GDAL_DATA'] = OSGEO4W + r"sharegdal"
    os.environ['PROJ_LIB'] = OSGEO4W + r"shareproj"
    os.environ['PATH'] = OSGEO4W + r"in;" + os.environ['PATH']
and run python manage.py check if you got the error still, please go to C:OSGeo4W64 or C:OSGeo4W. There you can find gdalxxx.dll. please rename the file name to 'gdal202' or 'gdal203' in error message. Please run python manage.py check, That must work.
 
PREVIOUS NEXT
Tagged: #Is #GDAL #If #setting
ADD COMMENT
Topic
Name
6+5 =