Take the 2-minute tour ×
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 have read both questions in regard to installing shapely on a Mac (OS Mountain Lion) and haven't been able to figure it out. I'm not familiar with python syntax and am just trying to get shapely installed so I can use the polygonizer plugin in QGIS.

I download and untar shapely to my downloads folder, but then I have no idea where to put it. I tried to put in some of the script from How to install shapely for python 2.6 (Mac) NOT 2.7? and http://tumblr.pauladamsmith.com/post/17663153373/howtoinstallgdalshapely, but all I get is "SyntaxError: invalid syntax" when I paste it into the QGIS python console. Example of something I tried:

cd -> '/Users/blablabla/Downloads/Shapely-1.2.17' File "", line 1 cd -> '/Users/blablabla/Downloads/Shapely-1.2.17' ^ SyntaxError: invalid syntax LDFLAGS=/Library/Frameworks/GEOS.framework/Versions/3/unix/bin/geos-config --libs File "", line 1 LDFLAGS=/Library/Frameworks/GEOS.framework/Versions/3/unix/bin/geos-config --libs ^ SyntaxError: invalid syntax CFLAGS=/Library/Frameworks/GEOS.framework/Versions/3/unix/bin/geos-config --cflags File "", line 1 CFLAGS=/Library/Frameworks/GEOS.framework/Versions/3/unix/bin/geos-config --cflags ^ SyntaxError: invalid syntax python setup.py install File "", line 1 python setup.py install ^ SyntaxError: invalid syntax

If someone has a basic explanation of what I'm supposed to be doing, it would be greatly appreciated.

share|improve this question
add comment

1 Answer 1

up vote 4 down vote accepted

Shapely is a Python module and not a QGIS plugin. Therefore you must use the terminal (Terminal.app) and not the QGIS python console to install shapely.

share|improve this answer
    
Thanks Gene. So I still have the folder untarred in my downloads folder. Do I need to move it somewhere else before I run in the code in the terminal? I am not getting any errors when I run it now, but it doesn't seem to be doing anything and QGIS still doesn't recognize shapely.ops. –  rayshimley Feb 8 '13 at 14:44
    
Shapely must be installed in the Python site-packages folder with the command python setup.py install (see the first link) –  gene Feb 9 '13 at 11:13
    
Thanks for your patience, I got it to work finally! –  rayshimley Feb 9 '13 at 14:50
add comment

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.