sgoldenlab / simba

SimBA (Simple Behavioral Analysis), a pipeline and GUI for developing supervised behavioral classifiers
https://simba-uw-tf-dev.readthedocs.io/
GNU General Public License v3.0
288 stars 140 forks source link

Install Issue Shapely #11

Closed dlhagger closed 4 years ago

dlhagger commented 4 years ago

After installing from the requirements.txt, getting the following Traceback:

Traceback (most recent call last): File "SimBA.py", line 51, in from ROI_freehand_draw_3 import roiFreehand File "C:\Users\dlhag\simba\simba\ROI_freehand_draw_3.py", line 6, in from shapely.geometry import Polygon File "C:\Users\dlhag\Anaconda3\envs\simba\lib\site-packages\shapely\geometry__init.py", line 4, in from .base import CAP_STYLE, JOIN_STYLE File "C:\Users\dlhag\Anaconda3\envs\simba\lib\site-packages\shapely\geometry\base.py", line 18, in from shapely.coords import CoordinateSequence File "C:\Users\dlhag\Anaconda3\envs\simba\lib\site-packages\shapely\coords.py", line 8, in from shapely.geos import lgeos File "C:\Users\dlhag\Anaconda3\envs\simba\lib\site-packages\shapely\geos.py", line 145, in _lgeos = CDLL(os.path.join(sys.prefix, 'Library', 'bin', 'geos_c.dll')) File "C:\Users\dlhag\Anaconda3\envs\simba\lib\ctypes\init.py", line 348, in init__ self._handle = _dlopen(self._name, mode) OSError: [WinError 126] The specified module could not be found

Tried a few shapely versions, couldn't get anything other than this.

Any thoughts?

sgoldenlab commented 4 years ago

Hi @dlhagger - yes, try this one:

Go to the following address and download Shapely 1.7.0: https://www.lfd.uci.edu/~gohlke/pythonlibs/#shapely

If you are using Python 3.6.0 and windows (as me) click on: Shapely‑1.7.0‑cp36‑cp36m‑win_amd64.whl (or here is a direct link to the file: https://download.lfd.uci.edu/pythonlibs/s2jqpv5t/Shapely-1.7.0-cp36-cp36m-win_amd64.whl)

Next, navigate to the download folder, open a command prompt and run: pip install Shapely-1.7.0-cp36-cp36m-win_amd64.whl

Let me know if that works.

NB: conda install shapely works as well.

dlhagger commented 4 years ago

Hi @sgoldenlab - tried to download directly and still got the same issue.

I did get it to work by building a python 3.6.10 env and using conda to install shapely, then pip installing the rest of the packages.