geos_c.h error

2,076 views
Skip to first unread message

fipoucat

unread,
Mar 1, 2014, 6:20:52 AM3/1/14
to scitoo...@googlegroups.com
I am installing iris but when installing the dependencies I have a problem with cartopy. When I try to install I have this error:

creating build/temp.macosx-10.6-intel-2.7/lib/cartopy
/usr/bin/clang -fno-strict-aliasing -fno-common -dynamic -arch i386 -arch x86_64 -g -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/Library/Frameworks/Python.framework/Versions/2.7/include -I./lib/cartopy -I/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c lib/cartopy/trace.cpp -o build/temp.macosx-10.6-intel-2.7/lib/cartopy/trace.o
lib/cartopy/trace.cpp:343:10: fatal error: 'geos_c.h' file not found
#include "geos_c.h"
         ^
1 error generated.
error: command '/usr/bin/clang' failed with exit status 1


Can someone help me solve the problem .  Very urgent!!!!

Best,

Thomas Green

unread,
Mar 5, 2014, 5:29:23 PM3/5/14
to scitoo...@googlegroups.com
I have just compiled iris on my Mac.  In the end I used a combination of the homebrew software manager (http://brew.sh/), pyenv, and pip to install the required dependencies.  From your error it seems you are missing the Geos install.  A very quick summary of what I did to install the dependencies is:

Install Xcode (has everything C related)
Install Xcode command line tools from http://developer.apple.com
First install pyenv.  Follow instructions from website - Mac uses bash..
Install pyenv virtualenv
Install a new version of Python just to be completely free from Mac version.
Switch to new Python using pyenv
Use brew from http://brew.sh/
$ brew install gfortran
$ pip install numpy
$ pip install scipy
$ pip install nose cython pyshp
$ brew install geos
$ brew install proj
$ pip install shapely
$ pip install pillow
$ pip install matplotlib
$ pip install https://github.com/SciTools/cartopy/archive/v0.10.0.zip
$ brew install udunits
Due to issues with netcdf tests failing (probably due to remote server down) ignore error in test if it is failing in only 1 test.
$ brew install  --verbose --debug homebrew/science/netcdf
$ pip install netcdf4
$ pip install http://downloads.sourceforge.net/project/pyke/pyke/1.1.1/pyke-1.1.1.zip

I havnt yet tested completely but it might be helpful to you.

Tom
Reply all
Reply to author
Forward
0 new messages