[Qgis-user] Problems with Shapely instalation, using the Console

William Kyngesburye woklist at kyngchaos.com
Sun Sep 29 08:15:55 PDT 2013


shapely has been forgotten on my list of things to look at.  I can work on a package.  Since it's essentially an interface to GEOS, I think I'll package it in the GEOS framework.

Note: In Paul Smith's instructions there is no need to separately install GDAL python, that is included in my GDAL framework.

On Sep 29, 2013, at 2:55 AM, gene wrote:

> It is a recurrent question: 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.
> 
> If you use the QGIS version of Kyng Chaos, this version uses the default
> Apple Python (modules in /Library/Python/2.x/site-packages/) and not other
> versions (Homebrew, MacPorts, Anaconda, etc.)
> 
> So you can use (one of the three options)
> 
>      - pip install shapely
>      - easy_install shapely
>      - Download the Shapely Python package from PyPI or Shapely from github
> and untar. Then, opening the terminal in the shapely folder: python setup.py
> install
> 
> This install the Plain-Python version:
> 
>>>> import shapely
>>>> shapely.__version__
>      '1.2.18'
> 
>>>> import shapely.speedups
>>>> print shapely.speedups.available
>      False
> 
> If you want to install the speedups-enabled version, the procedure was
> described by Paul Smith:  How to install GDAL, OGR and Shapely on Mac OS X
> Lion 10.7
> <http://tumblr.pauladamsmith.com/post/17663153373/howtoinstallgdalshapely>  
> and others on GIS StackExchange (it is the same for Snow Leopard and
> Mountain Lion)
> 
> As Shapely use the GEOS library which is installed in
> /Library/Frameworks/GEOS.framework/, you need to fix the paths 
> 
> LDFLAGS=`/Library/Frameworks/GEOS.framework/Versions/3/unix/bin/geos-config
> --libs` 
> CFLAGS=`/Library/Frameworks/GEOS.framework/Versions/3/unix/bin/geos-config
> --cflags` 
> 
> So
> 
> 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
> 
> and 
> 	
>>>> import shapely.speedups
>>>> print shapely.speedups.available
>      True
> 
> 
> 
> 
> 
> --
> View this message in context: http://osgeo-org.1560.x6.nabble.com/Problems-with-Shapely-instalation-using-the-Console-tp5080745p5080756.html
> Sent from the Quantum GIS - User mailing list archive at Nabble.com.
> _______________________________________________
> Qgis-user mailing list
> Qgis-user at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/qgis-user

-----
William Kyngesburye <kyngchaos*at*kyngchaos*dot*com>
http://www.kyngchaos.com/

"The beast is actively interested only in now, and, as it is always now and always shall be, there is an eternity of time for the accomplishment of objects."

- the wisdom of Tarzan








More information about the Qgis-user mailing list