I’m currently developing an application using Django and aiming to integrate geospatial functionalities by adding “django.contrib.gis” to my project’s INSTALLED_APPS. However, upon adding this module to INSTALLED_APPS in the settings.py file, I encounter the following error:
django.core.exceptions.ImproperlyConfigured: Could not find the GDAL library (tried "gdal307", "gdal306", "gdal305", "gdal304", "gdal303", "gdal302", "gdal301", "gdal300", "gdal204"). Is GDAL installed? If it is, try setting GDAL_LIBRARY_PATH in your settings
Despite having the GDAL library installed in the directory C:Program FilesPostgreSQL16gdal-data, specifying the GDAL_LIBRARY_PATH in the settings.py file doesn’t seem to resolve the issue. Additionally, I have installed PostGIS via the Application Stack Builder in PostgreSQL.
I’m seeking guidance on how to resolve this issue and successfully integrate “django.contrib.gis” into my Django project. Any insights or suggestions would be greatly appreciated. Thank you!
SindBadSystem is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.