I'm trying to install GDAL through pip. But I'm getting this error:
extensions/gdal_wrap.cpp:3089:27: fatal error: cpl_vsi_error.h: No such file or directory #include "cpl_vsi_error.h" ^ compilation terminated. error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
I used these commands:
sudo apt-get install libgdal-dev export CPLUS_INCLUDE_PATH=/usr/include/gdal export C_INCLUDE_PATH=/usr/include/gdal pip install GDAL
Can anyone tell me how to install it ?
gdal-utils: is the GDAL Python Utilities distribution. This is what you install. Its home page is https://pypi.org/project/gdal-utils/ . Install with pip install gdal-utils .
Currently, GDAL Python code itself is compatible with Python 2 and Python 3.
GDAL is available in the default repositories of most popular Linux distributions and can be installed in the same way that packages in a Linux distribution are usually installed. CPLUS_INCLUDE_PATH and C_INCLUDE_PATH are necessary in order to include these corresponding libraries.
Check that you installed GDAL using this command
gdal-config --version
Then run this commands:
pip download="some_path" GDAL cd some_path tar -xvzf GDAL-<version>.tar.gz cd GDAL-<version> python setup.py build_ext --include-dirs=/usr/include/gdal/ python setup.py install
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With