I'm trying to install GDAL for python 3.6.9 under Ubuntu 18.04 following the way at: https://pypi.org/project/GDAL/ I tried these two ways: 'easy_install' '''sudo easy_install GDAL''' and the 'setup.py' '''python setup.py build &&python setup.py install'''.
But they're all failed. Here is the information back to me when I use '''sudo easy_install GDAL''':
extensions/gdal_wrap.cpp:3209:9: error: ‘GDALExtendedDataTypeHS’ does not name a type; did you mean ‘GDALFindDataType’? typedef GDALExtendedDataTypeHS GDALExtendedDataTypeHS; ^~~~~~~~~~~~~~~~~~~~~~ GDALFindDataType
...
extensions/gdal_array_wrap.cpp:5771:51: error: expected ‘(’ before ‘*’ token extensions/gdal_array_wrap.cpp:5771:53: error: expected primary-expression before ‘>’ token arg8 = reinterpret_cast< GDALExtendedDataTypeHS * >(argp8); ^ extensions/gdal_array_wrap.cpp:5771:61: error: expected ‘)’ before ‘;’ token arg8 = reinterpret_cast< GDALExtendedDataTypeHS * >(argp8); ^
error: Setup script exited with error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
How can I install the GDAL properly?