[GIS] Error installing Shapely package using pip command

python-2.7shapely

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.

Best Answer

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