NeLy-EPFL / NeuroMechFly

A neuromechanical model of adult Drosophila melanogaster.
https://nely-epfl.github.io/NeuroMechFly/
Apache License 2.0
44 stars 1 forks source link

OSError: [WinError 126] The specified module (lgeos) could not be found on Windows 10 #26

Closed VictorLobatoRios closed 3 years ago

VictorLobatoRios commented 3 years ago

This error happens when running run_neuromuscular_control on Windows 10:

 File "run_neuromuscular_control", line 3, in <module>
    from NeuroMechFly.experiments.network_optimization import neuromuscular_control
  File "c:\users\lobato\neuromechfly\NeuroMechFly\experiments\network_optimization\neuromuscular_control.py", line 4, in <module>
    from shapely.geometry import Point, Polygon
  File "C:\Users\lobato\Anaconda3\envs\neuromechfly\lib\site-packages\shapely\geometry\__init__.py", line 4, in <module>
    from .base import CAP_STYLE, JOIN_STYLE
  File "C:\Users\lobato\Anaconda3\envs\neuromechfly\lib\site-packages\shapely\geometry\base.py", line 19, in <module>
    from shapely.coords import CoordinateSequence
  File "C:\Users\lobato\Anaconda3\envs\neuromechfly\lib\site-packages\shapely\coords.py", line 8, in <module>
    from shapely.geos import lgeos
  File "C:\Users\lobato\Anaconda3\envs\neuromechfly\lib\site-packages\shapely\geos.py", line 154, in <module>
    _lgeos = CDLL(os.path.join(sys.prefix, 'Library', 'bin', 'geos_c.dll'))
  File "C:\Users\lobato\Anaconda3\envs\neuromechfly\lib\ctypes\__init__.py", line 348, in __init__
    self._handle = _dlopen(self._name, mode)
OSError: [WinError 126] The specified module could not be found
VictorLobatoRios commented 3 years ago

Apparently, pip install of Shapely has problems in Windows, it was solved by running: 1.- pip uninstall Shapely

2.- conda install shapely

Alternately, the WHL file can be downloaded from: http://www.lfd.uci.edu/~gohlke/pythonlibs/#shapely

And the installation can be done by running: python -m pip install path\to\Shapely\file.whl