1

I am using QGIS 1.8.0 on Mac OS 10.8.3 with python 2.7. Thanks to other threads in the forum, I have successfully installed shapely here:

/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/Shapely-1.2.16-py2.7.egg

However, when I try to use the polygonizer-Plugin in QGIS it tells me that it cannot find shapely.ops. This clearly seems to be a path-problem, but I have no other versions of python installed. I have tried to append the above path to .bash-profile, but to no avail.

Any help is appreciated.

Nils

2
  • Can you post the exact error message?
    – R.K.
    Commented Apr 4, 2013 at 16:57
  • Because my local system is German I thought this would not be very helpful. I solved the issue anyway (see below), but many thanks for caring!
    – Nils
    Commented Apr 4, 2013 at 20:59

1 Answer 1

2

I'm sorry but you do not use the legacy version of Python installed by default and QGIS use exclusively this Apple Python, not another version of Python.

The site-packages of the Apple Python is /Library/Python/2.7/site-packages and not /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/. It is another version of Python (from Python.org or Enthought for example) and you must install Shapely in the Apple Python.

To verify, open the terminal (Terminal.app) and type:

For the Apple Python:

python
.......
>>> import shapely
>>> print shapely.__file__
'/Library/Python/2.7/site-packages/Shapely-1.2.17-py2.7.egg/shapely/__init__.pyc'
1
  • Stupid me! You are right, during the many installations last night I must have also installed python from Python.org. After removing the files under /Library/Frameworks/... and reinstalling shapely, the Polygonizer works! Many thanks!
    – Nils
    Commented Apr 4, 2013 at 20:56

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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