Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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, 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 install File "", line 1 python 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
up vote 4 down vote accepted

Shapely is a Python module and not a QGIS plugin. Therefore you must use the terminal ( 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 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

Your Answer


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.