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

Environment:
Windows 7 64-bit
Python 2.7

share|improve this question

2 Answers 2

up vote 3 down vote accepted

You're doing your installation wrong.

Instead of

pip install shapely

use the Windows installer available at https://pypi.python.org/pypi/Shapely#downloads

And click on the file Shapely-1.2.17.win-amd64-py2.7.exe

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

 
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.