'Django/Python unable to find GDAL Library

I have installed GDAL in a virtual environement with the following commands:

$ brew install gdal
$ pip3 install gdal

When trying a python manage.py makemigrations or python manage.py runserver (or whatever) on the website code for which I installed it, I'm running into the following error:

django.core.exceptions.ImproperlyConfigured: Could not find the GDAL library (tried "gdal", "GDAL", "gdal2.4.0", "gdal2.3.0", "gdal2.2.0", "gdal2.1.0", "gdal2.0.0"). Is GDAL installed? If it is, try setting GDAL_LIBRARY_PATH in your settings.

I'm struggling to find good information on how to set this variable correctly, or general informations on how to solve the problem. I'm using MacOS Catalina. I have no experiences with GDAL, at this stage I just need to install it properly to make the website run on my machine and start contributing to the code. Any help would be appreciated.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source