This is in continuation with my earlier question Geospatial Analytics in Python
I started a new question to keep the 2 issues logically separate.
I have trying to install geopandas on python 2.6
surprisingly, geopandas is already installed by GeoSeries doesn't work and it needs a package "Fiona". I followed the instruction provided here
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
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: No such file or directory
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
Any help with sorting the issues and getting geopandas installed will be greatly appreciated
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
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.
来源:https://stackoverflow.com/questions/33445551/installing-geopandas-on-python-2-6