I'm using Windows 10 and python 2.7. Even though I updated pip it's getting error:

shapely installation

ERROR: Command errored out with exit status 1:
     command: 'c:\python27\python.exe' -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'c:\\users\\pc\\appdata\\local\\temp\\pip-install-eztkma\\shapely\\setup.py'"'"';
__file__='"'"'c:\\users\\pc\\appdata\\local\\temp\\pip-install-eztkma\\shapely\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base pip-egg-info
             cwd: c:\users\pc\appdata\local\temp\pip-install-eztkma\shapely\
        Complete output (9 lines):
        Traceback (most recent call last):
          File "<string>", line 1, in <module>
          File "c:\users\pc\appdata\local\temp\pip-install-eztkma\shapely\setup.py", line 80, in <module>
            from shapely._buildcfg import geos_version_string, geos_version, \
          File "shapely\_buildcfg.py", line 200, in <module>
            lgeos = CDLL("geos_c.dll")
          File "c:\python27\lib\ctypes\__init__.py", line 362, in __init__
            self._handle = _dlopen(self._name, mode)
    WindowsError: [Error 126] The specified module could not be found
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
  • I got the same error few minutes ago with the same package but with different python version (3.6), what a timing... I let you know if I find a solution
    – Michael
    Jul 25, 2019 at 13:53

3 Answers 3


Got the solution on an issue of the shapely project on github https://github.com/Toblerity/Shapely/issues/738

There are no versions 1.6 distributions suitable for Windows on PyPI.

We can install old compatible version like 1.4.1 with this command.

pip install shapely==1.4.1

Another option is to install Shapely from a wheel file.

Download Shapely-1.6.4.post2-cp27-cp27m-win32.whl

Install using pip install /path/to/file


I faced the same challenge, but prefer to use the "built installation" wheels method, as linked from the shapely project page:


It's a bit fiddly and obscure to get started, but it seems worth it to avoid being stuck on an old build of shapely.

Not the answer you're looking for? Browse other questions tagged or ask your own question.