To use gdal
in Python, you need to install the gdal
packages on your computer. One way to do this is to use the package manager homebrew
. We will follow that approach here.
Now install gdal
:
Install the headers files first to avoid GDAL fail.
brew install gdal --HEAD
Then
brew install gdal
Check the install with:
gdal-config --version
which should give e.g.
3.5.1
If you hit problems, read what it says and respond accordingly. For OS X for example, you may need to install xcode
command line tools if you don't already have that. N.B. That might take some time. You might also look at this advice page
You might find it useful to use brew
to install some other basic software that might be missing from your computer. One good example is wget
, which is an alternative to curl
:
brew install wget