0

I'm trying to install shapely but I got an error:

Collecting shapely
  Using cached https://files.pythonhosted.org/packages/a2/fb/7a7af9ef7a35d16fa23b127a
bee272cfc483ca89029b73e92e93cdf36e6b/Shapely-1.6.4.post2.tar.gz
    ERROR: Complete output from command python setup.py egg_info:
    ERROR: Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "C:\Users\iibra\AppData\Local\Temp\pip-install-effo6cnn\shapely\setup.py",
 line 80, in <module>
        from shapely._buildcfg import geos_version_string, geos_version, \
      File "C:\Users\iibra\AppData\Local\Temp\pip-install-effo6cnn\shapely\shapely\_b
uildcfg.py", line 200, in <module>
        lgeos = CDLL("geos_c.dll")
      File "c:\users\iibra\appdata\local\programs\python\python36\lib\ctypes\__init__
.py", line 348, in __init__
        self._handle = _dlopen(self._name, mode)
    OSError: [WinError 126] The specified module could not be found
    ----------------------------------------
ERROR: Command "python setup.py egg_info" failed with error code 1 in

I tried to install the binaries from https://www.lfd.uci.edu/~gohlke/pythonlibs/#shapely

I tried also to read this https://github.com/Toblerity/Shapely

I read these answers and different answers: Python, GEOS and Shapely on Windows 64

Zoe
  • 27,060
  • 21
  • 118
  • 148
I_Al-thamary
  • 3,385
  • 2
  • 24
  • 37

1 Answers1

0

I tried many solutions and this what worked for me. I install OSGeo4W from https://trac.osgeo.org/osgeo4w/ and after that, I add the path of OSGeo4W which is C:\OSGeo4W64\bin to my Environment Variables. And then I use pip to install the shapely Project

pip install shapely

https://pypi.org/project/Shapely/

I_Al-thamary
  • 3,385
  • 2
  • 24
  • 37