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 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

share|improve this question
    
Can you post the exact error message? –  R.K. Apr 4 '13 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 Apr 4 '13 at 20:59
add comment

1 Answer

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'
share|improve this answer
    
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 Apr 4 '13 at 20:56
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.