python setup.py build_ext –include-dirs = usrincludegdalnot work

python setup.py build_ext –include-dirs = usrincludegdalnot work,第1张

概述我正在尝试安装GDAL ina virstualenvwrapper,遵循几个指南和StackOverflow答案. 我在ubuntu 13.04上,我是ligbdal1和libgdal1-dev 在我的virtualenv里面,我尝试过: pip install --no-install GDAL …之后: python setup.py build_ext --include-dirs=/us 我正在尝试安装GDAL ina virstualenvwrapper,遵循几个指南和StackOverflow答案.

我在ubuntu 13.04上,我是ligbdal1和libgdal1-dev

在我的virtualenv里面,我尝试过:

pip install --no-install GDAL

…之后:

python setup.py build_ext --include-dirs=/usr/include/gdal/

但是我得到了这个错误:

running build_extbuilding 'osgeo._gdal' extensionx86_64-linux-gnu-gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -I/usr/include/gdal/ -I/usr/include/python2.7 -I/home/envs/test/local/lib/python2.7/site-packages/numpy/core/include -I/usr/include -c extensions/gdal_wrap.cpp -o build/temp.linux-x86_64-2.7/extensions/gdal_wrap.occ1plus: warning: command line option ‘-Wstrict-prototypes’ is valID for C/ObjC but not for C++ [enabled by default]extensions/gdal_wrap.cpp: In function ‘int PyProgressproxy(double,const char*,voID*)’:extensions/gdal_wrap.cpp:3237:2: warning: the address of ‘_Py_Nonestruct’ will never be NulL [-Waddress]extensions/gdal_wrap.cpp: In function ‘int GDALtransformerInfoShadow_transformGeolocations(GDALtransformerInfoShadow*,GDALRasterBandShadow*,GDALProgressFunc,voID*,char**)’:extensions/gdal_wrap.cpp:5010:69: error: ‘GDALtransformGeolocations’ was not declared in this scopeextensions/gdal_wrap.cpp: In function ‘PyObject* _wrap_GOA2GetAuthorizationURL(PyObject*,PyObject*)’:extensions/gdal_wrap.cpp:5553:79: error: ‘GOA2GetAuthorizationURL’ was not declared in this scopeextensions/gdal_wrap.cpp: In function ‘PyObject* _wrap_GOA2GetRefreshToken(PyObject*,PyObject*)’:extensions/gdal_wrap.cpp:5606:94: error: ‘GOA2GetRefreshToken’ was not declared in this scopeextensions/gdal_wrap.cpp: In function ‘PyObject* _wrap_GOA2GetAccesstoken(PyObject*,PyObject*)’:extensions/gdal_wrap.cpp:5661:93: error: ‘GOA2GetAccesstoken’ was not declared in this scopeextensions/gdal_wrap.cpp: In function ‘PyObject* _wrap_ReadDirRecursive(PyObject*,PyObject*)’:extensions/gdal_wrap.cpp:6081:61: error: ‘VSIReadDirRecursive’ was not declared in this scopeextensions/gdal_wrap.cpp: In function ‘PyObject* _wrap_MajorObject_SetMetadata__SWIG_0(PyObject*,PyObject*)’:extensions/gdal_wrap.cpp:7501:31: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]extensions/gdal_wrap.cpp: In function ‘int GDALtransformerInfoShadow_transformGeolocations(GDALtransformerInfoShadow*,char**)’:extensions/gdal_wrap.cpp:5011:3: warning: control reaches end of non-voID function [-Wreturn-type]error: command 'x86_64-linux-gnu-gcc' Failed with exit status 1`

有什么建议?哪里可能会出错?

解决方法 看来Ubuntu 13.04上的libgdal1包已经过时了.
Python cheeseshop(PyPi,这是pip使用的)提供了1.10.0包装,而 the 13.04 package list显示提供了libgdal版本1.9.0.显然,在1.10中,引入了许多新功能,这些功能是您所看到的“未声明”错误.

因此,有两种选择:

>手动安装libgdal 1.10.在这种情况下,您可以使用配置脚本的–with-python选项,而无需安装单独的Python绑定.我猜你也是最新最好的.
>下载旧的Python gdal包装器from the Python cheeseshop,并从那里继续.这可能是最简单的选择.

总结

以上是内存溢出为你收集整理的python setup.py build_ext –include-dirs = /usr/include / gdal / not work全部内容,希望文章能够帮你解决python setup.py build_ext –include-dirs = /usr/include / gdal / not work所遇到的程序开发问题。

如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。

欢迎分享,转载请注明来源:内存溢出

原文地址: http://outofmemory.cn/langs/1192925.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-06-03
下一篇 2022-06-03

发表评论

登录后才能评论

评论列表(0条)

保存