在Python 2.6上安装geopandas [英] Installing geopandas on Python 2.6

查看:219
本文介绍了在Python 2.6上安装geopandas的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这是我先前的问题 Python中的地理空间分析的延续

我提出了一个新问题,以将两个问题在逻辑上分开.

I started a new question to keep the 2 issues logically separate.

我试图在python 2.6上安装geopandas

I have trying to install geopandas on python 2.6

令人惊讶的是,GeoSeries已经安装了geopandas,它无法正常工作,它需要一个软件包"Fiona".我遵循了此处提供的说明

surprisingly, geopandas is already installed by GeoSeries doesn't work and it needs a package "Fiona". I followed the instruction provided here

我通过搜索并遵循建议来安装所需的库(包括认为我会获得.h文件的dev库),但是我仍然遇到以下两个问题:

I installed the libraries required by searching and following the suggestions (including dev libraries thinking I'll get the .h files), I am however stuck with these two issues:

https://github.com/Toblerity/Fiona

从Fiona上的git和python setup.py安装克隆后,出现错误:

after cloning from git and python setup.py install on Fiona, I get the error:

gcc -pthread -fno-strict-aliasing -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE = 2 -fexceptions -fstack-protector --param = ssp-buffer-size = 4 -m64 -mtune = generic -D_GNU_SOURCE -fPIC -fwrapv -DNDEBUG -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE = 2 -fexceptions -fstack-protector --param = ssp-buffer-size = 4 -m64 -mtune = generic -D_GNU_SOURCE -fPIC -fwrapv -fPIC -I/usr/include/python2.6 -c fiona/_geometry.c -o build/temp.linux-x86_64-2.6/fiona/_geometry.o gcc:fiona/_geometry.c:没有此类文件或目录

gcc -pthread -fno-strict-aliasing -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -DNDEBUG -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -fPIC -I/usr/include/python2.6 -c fiona/_geometry.c -o build/temp.linux-x86_64-2.6/fiona/_geometry.o gcc: fiona/_geometry.c: No such file or directory

pip install geopandas提供

pip install geopandas gives

fiona/_transform.cpp:269:18: error: gdal.h: No such file or directory

fiona/_transform.cpp:270:26: error: gdal_version.h: No such file or directory

fiona/_transform.cpp:271:22: error: cpl_conv.h: No such file or directory

fiona/_transform.cpp:272:24: error: cpl_string.h: No such file or directory

fiona/_transform.cpp:273:21: error: cpl_vsi.h: No such file or directory

fiona/_transform.cpp:274:22: error: ogr_core.h: No such file or directory

在解决问题和安装Geopandas方面的任何帮助将不胜感激

Any help with sorting the issues and getting geopandas installed will be greatly appreciated

推荐答案

在Linux Mint,Python 2.7.10(Anaconda):

On Linux Mint, Python 2.7.10 (Anaconda):

sudo apt-get install libgeos-dev
sudo apt-get install libgdal-dev
pip install geopandas

Successfully installed descartes-1.0.1 fiona-1.6.2 geopandas-0.1.1 pyproj-1.9.4

我建议移至2.7.10.这两个开发库是我系统上所需的全部.看来您可能缺少 libgdal-dev .

I would recommend moving to 2.7.10. The two development libraries were all that I needed on my system. It seems that you are likely missing libgdal-dev.

这篇关于在Python 2.6上安装geopandas的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆