3

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.

rayshimley
  • 33
  • 3

1 Answers1

4

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.

gene
  • 54,868
  • 3
  • 110
  • 187
  • 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 08 '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 09 '13 at 11:13