Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have tried to install shapely on Ubuntu 12.10. Therefore I installed libgeos-c1, pip and shapely with $ pip install Shapely. The shapely files are now in /home/user/build/Shapely. When I try to import it in my python script with

from shapely.geometry import Point

gives the following error:

from shapely.geometry import * File "/usr/lib/python2.7/dist-packages/qgis/", line 309, in _import mod = _builtin_import(name, globals, locals, fromlist, level) ImportError: No module named shapely.geometry

Any idea why it is not working?

share|improve this question
up vote 6 down vote accepted

For easier installation the module is in the repositories:

sudo apt-get install python-shapely

From the directory you said, you've installed the module in a non standard place and not in a path that is being watched by python.

To check which paths are currently active you can issue the following from within the python interpreter:

import sys
print sys.path

Of course you can always append your custom path with

import sys
#And then
import shapely
share|improve this answer
Great, it worked!! Thank you very much! – Martin Jun 28 '13 at 11:56

Your Answer


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.