March 20, 2024

Django: Fuss-free use of Homebrew GDAL/GEOS libraries on macOS

published by Adam Johnson
in blog Adam Johnson
published date 2024-03-20
original entry Django: Fuss-free use of Homebrew GDAL/GEOS libraries on macOS

GeoDjango requires the GDAL and GEOS spatial libraries. On macOS, you can use Homebrew to install these, but they wonโ€™t be picked up by default since they live in a non-default library directory, /opt/homebrew/lib. Django will fail to start with an exception:

Traceback (most recent call last โ€ฆ