Import error: no module named _gdal_array
Make sure you have numpy
installed before you attempt to install the GDAL Python bindings; without numpy
, it appears the _gdal_array
native code will not be installed.
If you ended up in this situation, removing gdal
, installing numpy
and then reinstalling gdal
might help:
pip uninstall gdal
pip install numpy
pip install GDAL==$(gdal-config --version) --global-option=build_ext --global-option="-I/usr/include/gdal"