46π
In Ubuntu you can install GDAL library by running:
sudo apt-get install gdal-bin
This fixed the error.
π€iraj jelodari
- [Django]-Django excluding one queryset from another
- [Django]-Testing Django apps that use South migrations
- [Django]-What is the best location to put templates in django project?
1π
For Mac OS
Run brew install gdal
If you already have it installed, and are still facing the issue, I did the following.
Run
brew info gdal geos
This will list the current path where they are installed and their dependencies. Something like this,
==> gdal: stable 3.7.2 (bottled), HEAD
Geospatial Data Abstraction Library
https://www.gdal.org/
Conflicts with:
avce00 (because both install a cpl_conv.h header)
cpl (because both install cpl_error.h)
/opt/homebrew/Cellar/gdal/3.7.2 (474 files, 27.9MB) *
Poured from bottle using the formulae.brew.sh API on 2023-09-25 at 13:35:19
From: https://github.com/Homebrew/homebrew-core/blob/HEAD/Formula/g/gdal.rb
License: MIT
==> Dependencies
Build: boost β, cmake β, pkg-config β, swig β
Required: apache-arrow β, cfitsio β, epsilon β, expat β, freexl β, geos β, giflib β, hdf5 β, jpeg-turbo β, jpeg-xl β, json-c β, libarchive β, libgeotiff β, libheif β, libkml β, liblerc β, libpng β, libpq β, libspatialite β, libtiff β, libxml2 β, netcdf β, numpy β, openexr β, openjpeg β, openssl@3 β, pcre2 β, poppler β, proj β, python@3.11 β, qhull β, sqlite β, unixodbc β, webp β, xerces-c β, xz β, zstd β
==> Options
--HEAD
Install HEAD version
==> Analytics
install: 14,204 (30 days), 33,238 (90 days), 65,053 (365 days)
install-on-request: 11,665 (30 days), 27,230 (90 days), 53,906 (365 days)
build-error: 90 (30 days)
==> geos: stable 3.12.0 (bottled)
Geometry Engine
https://libgeos.org/
/opt/homebrew/Cellar/geos/3.12.0 (491 files, 13.7MB) *
Poured from bottle using the formulae.brew.sh API on 2023-08-23 at 12:46:05
From: https://github.com/Homebrew/homebrew-core/blob/HEAD/Formula/g/geos.rb
License: LGPL-2.1-or-later
==> Dependencies
Build: cmake β
==> Analytics
install: 4,065 (30 days), 14,532 (90 days), 31,010 (365 days)
install-on-request: 1,753 (30 days), 6,409 (90 days), 13,380 (365 days)
build-error: 0 (30 days)
For all the packages marked x
, run brew install
individually.
After that add
GDAL_LIBRARY_PATH = '/opt/homebrew/Cellar/gdal/3.7.2/lib/libgdal.dylib' GEOS_LIBRARY_PATH = '/opt/homebrew/Cellar/geos/3.12.0/lib/libgeos_c.dylib'
to your settings.py (Exact path may differ with version)
π€Sandeep Singh
- [Django]-Using django signals in channels consumer classes
- [Django]-Multiple annotate Sum terms yields inflated answer
- [Django]-Django filter with regex
- [Django]-How to quote a string value explicitly (Python DB API/Psycopg2)
- [Django]-Django-Bower + Foundation 5 + SASS, How to configure?
- [Django]-Django equivalent of PHP's form value array/associative array
Source:stackexchange.com