Could not find the GDAL library (connection with Hana)

I am using Python 3.8.5 version and the Django 3.2.4. I already install GDAL library from the official website with the version 3.3.0. with a pip install.

There are 4 databases presents at the origin in Django but I have to use the Hana one which is not present. I have only found 2 topics relative to that on GitHub but they are both very old (4 years and 8 years ago). I have tried everything to solve that problem but nothing seems to work. I already have the following message when I try to make migrations :

“django.core.exceptions.ImproperlyConfigured: Could not find the GDAL library (tried “gdal302”, “gdal301”, “gdal300”, “gdal204”, “gdal203”, “gdal202”, “gdal201”, “gdal20”). Is GDAL installed? If it is, try setting GDAL_LIBRARY_PATH in your settings.”

Someone has an idea to solve that problem ?

  • What is the name of the GDAL library you installed?
  • What operating system are you using?
  • Are you working in a virtual environment?
  • How are you running your application? (Is this in testing using runserver or runserver_plus? Or something else like uwsgi or gunicorn?)

I’ve got two guesses here.

  • It’s looking for you to set GDAL_LIBRARY_PATH as an environment variable for your runtime.
  • Or, the library that you installed is just the Python module for an underlying system-level package that also needs to be installed.

Also, this topic more appropriately belongs in the Using Django category, not the Internals category. You can click on the pencil icon that appears to the right of the title and change it.