2

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

Community
  • 1
  • 1
GreenThumb
  • 483
  • 1
  • 7
  • 25

1 Answers1

0

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.

wgwz
  • 2,642
  • 2
  • 23
  • 35
  • I am running centos 6.3, I tried the same libraries with yum install and I am unable to find the packages. I tried to get the repo to add to yum and there isn't much out there. The closest I got to was [link](https://github.com/oikoumene/wcc.buildout) [root@sandbox ~]# yum install geos Package geos-3.3.2-1.el6.x86_64 already installed and latest version **Nothing to do** – GreenThumb Nov 02 '15 at 22:56
  • I got it moving with yum install gdal* Not able to move it any further, too many version mismatches or dependencies not available – GreenThumb Nov 03 '15 at 01:53
  • Any way to get Anaconda on there? – wgwz Nov 03 '15 at 02:22
  • yes, I can, Can you point me to the link/doco how to go about after I install Anaconda? Haven't used it before. – GreenThumb Nov 03 '15 at 02:31
  • Here is a conda build recipe for geopandas: https://github.com/TheClimateCorporation/conda-recipes/blob/master/geopandas/meta.yaml and here is a guide for using "conda-build": http://conda.pydata.org/docs/building/recipe.html – wgwz Nov 03 '15 at 04:22
  • I used yum upgrade and upgraded my whole system. After that geopands seems to work fine. I can use geopandas with python without any errors. Fiona however is elusive I am not able to get it working and from past 3 days gdal.h seems to be the problem - Perhaps I'll raise installing Fiona as as seperate question? – GreenThumb Nov 03 '15 at 04:45
  • Do what you want. I suggest stepping away from the problem for a few days and focusing on other things. Don't worry about Fiona, unless you need it. – wgwz Nov 03 '15 at 17:53