Clean up any existing installs with
brew uninstall gdal netcdf libgeotiff libspatialite proj
Add osgeo tap and install (note this will also install python 3.7.7 as a dep)
brew tap osgeo/osgeo4mac && brew tap --repair
brew install osgeo/gdal
brew install ogseo/gdal-python
Test with
gdalinfo --version
gdal_polygonize.py
If both work, you are done. If gdal_polygonize.py doesn't work, follow below:
Make sure this is the same version brew just installed... 3.1.0_2 as of current
ls /usr/local/Cellar/osgeo-gdal/
if you need to get the revision number.
pip download GDAL==3.1.0
tar -xpzf GDAL-3.1.0.tar.gz
cd GDAL-3.1.0
python setup.py build_ext --gdal-config /usr/local/Cellar/osgeo-gdal/3.1.0_2/bin/gdal-config
python setup.py build
python setup.py install
> gdal_polygonize.py
Looks like
brew install osgeo-gdal
andbrew install osgeo-gdal-python
also work as shortcuts once the tap is tapped