这个问题与我之前的两个问题有关:
Geospatial Analytics in Python
Installing geopandas on Python 2.6
我通过升级整个系统让geopandas工作。我没有运气让菲奥娜工作,下面是我尝试
时所得到的错误[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
好吧。。所以大约一周后,这就是我所做的,而且似乎起作用了
从http://download.osgeo.org/gdal/下载源代码并编译该源代码
从https://pypi.python.org/pypi/GDAL/下载了用于python的GDAL并构建了它
我把python更新到2.7
然后:
pip安装fiona
pip安装geopandas
相关问题 更多 >
编程相关推荐