Tell me more ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

I'm trying to use Polygonizer plugin inside QGIS, but it needs Shapely to work. I've installed Shapely (pip install Shapely) but that's for python 2.7. QGIS works with python 2.6 (on Snow Leopard) and I can't find previous installers for it. Maybe I'm missing something?

Thanks.

share|improve this question

1 Answer

up vote 2 down vote accepted

I assume you are using the KyngChaos version of QGIS and thus the GEOS library is installed in /Library/Frameworks/GEOS.framework/

Download the Shapely Python package from PyPI or Shapely from github and untar.

Then, in the terminal:

cd -> shapely folder
LDFLAGS=`/Library/Frameworks/GEOS.framework/Versions/3/unix/bin/geos-config --libs`
CFLAGS=`/Library/Frameworks/GEOS.framework/Versions/3/unix/bin/geos-config --cflags` 
python setup.py install
share|improve this answer
Thanks gene. All your assumptions are correct. I did everything as you suggested, though used "sudo python setup.py install" instead. But it still installs it for python 2.7. "Installed /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/Sh‌​apely-1.2.16-py2.7.egg" – Pey Man Jan 7 at 23:16
it is because you use the 2.7 version you have installed and not the installed version of Python on Snow Leopard which is 2.6. QGIS uses this version. It is a path problem – gene Jan 9 at 7:14

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.