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 am trying to run Shapely on a new machine, and tried both installing it from source, using the installer on its webpage, and using pip install shapely. Every reference I try to make from the library except from shapely import * throws the error WindowsError: [Error 126] The specified module could not be found. Has anyone had a similar experience when trying to leverage Shapely, and figure out how to get it to function correctly?

Python Error Thrown:
WindowsError: [Error 126] The specified module could not be found

Windows 7 64-bit
Python 2.7

share|improve this question
up vote 9 down vote accepted

You're doing your installation wrong.

Instead of

pip install shapely

use the Windows installer available at

And click on the file

Launch the install and it will be OK after.

Just as an information, "pip install shapely" works when you have the C compiler installed to build Geos dll and it's not the way it works on Windows.

share|improve this answer
Yeah, you are correct. Then I was not able to clean it all up correctly which was giving me the issue. Once I got it cleaned up, I ran just the installer and it started behaving again. – dkroy Jun 6 '13 at 20:57

Error 126 indicates that some dependent DLL can not be found. Presumably, this is because Shapely can not find GEOS.

Try using the install from pypi: LINK.

share|improve this answer

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.