Error while installing GDAL

前端 未结 4 1678
庸人自扰
庸人自扰 2021-02-03 22:07

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 directo         


        
4条回答
  •  Happy的楠姐
    2021-02-03 22:50

    I had to include the header files as well to successfully install gdal:

    sudo pip3 install GDAL==$(gdal-config --version | awk -F'[.]' '{print $1"."$2}') --global-option=build_ext --global-option="-I/usr/include/gdal"
    

    Note: Using Python 3 and gdal was already installed on centOS

提交回复
热议问题