brew install gdal
apt install libgdal-dev gdal-bin
wheel
is really important! without it you can't use gdal_array
pip install -U pip setuptools wheel
pip install -U numpy
pip install --no-cache-dir --force-reinstall --no-build-isolation gdal==$(gdal-config --version)