0

For a given Django Project (to which I'm new) I need to install GDAL version: x86_64 because whenever I try python manage.py migrate on my Django project I get the following error:

OSError: dlopen(/Users/name/lib/libgdal.dylib, 0x0006): tried: '/Users/name/lib/libgdal.dylib' (mach-o file, but is an incompatible architecture (have 'arm64', need 'x86_64'))....

I tried to switch the architecture of the terminal from arm64 to i386 and download it with the that architecture but I get the same error.

In my settings.py the libraries GDAL and GEOS variable are declared as follows:

GDAL_LIBRARY_PATH = '/opt/homebrew/opt/gdal/lib/libgdal.dylib'
GEOS_LIBRARY_PATH = '/opt/homebrew/opt/geos/lib/libgeos_c.dylib'

I searched and tried a lot of things, but nothing worked - have anyone had the same problem?

SCH361
  • 41
  • 1
  • 7

1 Answers1

0

I successfully solved it with the answer from Ronald (M1 Mac - GDAL Wrong Architecture Error [Django])

I had to download both with a arm64 architecture, because my python was arch x86_64.

SCH361
  • 41
  • 1
  • 7