I have installed the contour plugin on my kubuntu 13 laptop, but when I am opening qgis (2.0.1) I get the following message:

Couldn't load plugin contour due an error when calling its classFactory() method

Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/qgis/utils.py", line 204, in startPlugin
    plugins[packageName] = package.classFactory(iface)
  File "/home/maria/.qgis2/python/plugins/contour/__init__.py", line 47, in classFactory
    from contour import Contour
  File "/usr/lib/python2.7/dist-packages/qgis/utils.py", line 453, in _import
    mod = _builtin_import(name, globals, locals, fromlist, level)
  File "/home/maria/.qgis2/python/plugins/contour/contour.py", line 41, in 
    from shapely.geometry import MultiLineString, MultiPolygon
  File "/usr/lib/python2.7/dist-packages/qgis/utils.py", line 453, in _import
    mod = _builtin_import(name, globals, locals, fromlist, level)
ImportError: No module named shapely.geometry

How can I solve this problem?

1 Answer 1


Your install seems to be missing the shapely python module (I often get a similar error message when I install QGIS on a new machine and fire up contour for the first time).

I'm a Win user myself (so I just installed it via the OSGeo4W installer), but I imagine you should be able to find shapely via your accessible repositories.

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.