1

这个问题与我之前的两个问题有关:

Python 中的地理空间分析

在 Python 2.6 上安装 geopandas

我通过升级整个系统让 geopandas 工作。我没有让 Fiona 工作,以下是我尝试时遇到的错误

[root@sandbox ~]# pip install fiona

   fiona/ogrext.c: In function ‘pyx_f_5fiona_6ogrext_14FeatureBuilder_build’:

    fiona/ogrext.c:3255: warning: assignment discards qualifiers from pointer target type
    fiona/ogrext.c: In function ‘pyx_pf_5fiona_6ogrext_7Session_4start’:
    fiona/ogrext.c:8043: warning: implicit declaration of function ‘OGR_L_GetName’
    fiona/ogrext.c:8043: warning: assignment makes pointer from integer without a cast
    fiona/ogrext.c: In function ‘pyx_pf_5fiona_6ogrext_7Session_14get_driver’:
    fiona/ogrext.c:8912: warning: assignment discards qualifiers from pointer target type
    fiona/ogrext.c: In function ‘pyx_pf_5fiona_6ogrext_7Session_16get_schema’:
    fiona/ogrext.c:9162: warning: assignment discards qualifiers from pointer target type
    fiona/ogrext.c: In function ‘pyx_pf_5fiona_6ogrext_7Session_18get_crs’:
    fiona/ogrext.c:10069: warning: assignment discards qualifiers from pointer target type
    fiona/ogrext.c:10078: warning: assignment discards qualifiers from pointer target type
    fiona/ogrext.c: In function ‘pyx_pf_5fiona_6ogrext_7Session_22get_extent’:
    fiona/ogrext.c:11112: warning: passing argument 2 of ‘OGR_L_GetExtent’ from incompatible pointer type
    /usr/include/gdal/ogr_api.h:324: note: expected ‘struct OGREnvelope *’ but argument is of type ‘struct pyx_t_5fiona_6ograpi_OGREnvelope *’
    fiona/ogrext.c: In function ‘pyx_pf_5fiona_6ogrext_14WritingSession_start’:
    fiona/ogrext.c:13233: warning: statement with no effect
    fiona/ogrext.c:14390: warning: assignment makes pointer from integer without a cast
    fiona/ogrext.c: In function ‘pyx_pf_5fiona_6ogrext_13_listlayers’:
    fiona/ogrext.c:19743: warning: assignment makes pointer from integer without a cast
    fiona/ogrext.c: In function ‘pyx_pf_5fiona_6ogrext_15buffer_to_virtual_file’:
    fiona/ogrext.c:19866: error: ‘VSILFILE’ undeclared (first use in this function)
    fiona/ogrext.c:19866: error: (Each undeclared identifier is reported only once
    fiona/ogrext.c:19866: error: for each function it appears in.)
    fiona/ogrext.c:19866: error: ‘pyx_v_vsi_handle’ undeclared (first use in this function)
    error: command 'gcc' failed with exit status 1
    ----------------------------------------
Command "/usr/bin/python -c "import setuptools, tokenize;__file__='/tmp/pip-build-oCUpd1/fiona/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-8szSWo-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-build-oCUpd1/fiona
4

1 回答 1

0

好的..所以一周左右后,这就是我所做的,它似乎正在工作

http://download.osgeo.org/gdal/下载源代码并编译源代码

从https://pypi.python.org/pypi/GDAL/下载 GDAL for python并构建它

我将 python 更新到 2.7

然后:

点安装菲奥娜

点安装geopandas

于 2015-11-11T22:58:35.880 回答