安装GDAL时出错 [英] Error while installing GDAL
本文介绍了安装GDAL时出错的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在尝试通过pip安装GDAL.但是我遇到了这个错误:
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
我使用了以下命令:
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
Check that you installed GDAL using this command
gdal-config --version
然后运行以下命令:
pip install --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
这篇关于安装GDAL时出错的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文