rg314 / pytraction

Bayesian Traction Force Microscopy
BSD 3-Clause "New" or "Revised" License
3 stars 1 forks source link

FileNotFoundError: DLL with shapely #29

Open rg314 opened 3 years ago

rg314 commented 3 years ago
---------------------------------------------------------------------------
FileNotFoundError                         Traceback (most recent call last)
<ipython-input-1-7851ea25c172> in <module>
      3 import matplotlib.pyplot as plt
      4 
----> 5 from pytraction.core import TractionForce
      6 from pytraction.utils import plot

~\miniconda3\envs\pytraction\lib\site-packages\pytraction\core.py in <module>
      8 from collections import defaultdict
      9 from read_roi import read_roi_file
---> 10 from shapely import geometry
     11 import pickle
     12 import zipfile

~\miniconda3\envs\pytraction\lib\site-packages\shapely\geometry\__init__.py in <module>
      2 """
      3 
----> 4 from .base import CAP_STYLE, JOIN_STYLE
      5 from .geo import box, shape, asShape, mapping
      6 from .point import Point, asPoint

~\miniconda3\envs\pytraction\lib\site-packages\shapely\geometry\base.py in <module>
     17 
     18 from shapely.affinity import affine_transform
---> 19 from shapely.coords import CoordinateSequence
     20 from shapely.errors import WKBReadingError, WKTReadingError
     21 from shapely.geos import WKBWriter, WKTWriter

~\miniconda3\envs\pytraction\lib\site-packages\shapely\coords.py in <module>
      6 from ctypes import byref, c_double, c_uint
      7 
----> 8 from shapely.geos import lgeos
      9 from shapely.topology import Validating
     10 

~\miniconda3\envs\pytraction\lib\site-packages\shapely\geos.py in <module>
    152     if os.getenv('CONDA_PREFIX', ''):
    153         # conda package.
--> 154         _lgeos = CDLL(os.path.join(sys.prefix, 'Library', 'bin', 'geos_c.dll'))
    155     else:
    156         try:

~\miniconda3\envs\pytraction\lib\ctypes\__init__.py in __init__(self, name, mode, handle, use_errno, use_last_error, winmode)
    379 
    380         if handle is None:
--> 381             self._handle = _dlopen(self._name, mode)
    382         else:
    383             self._handle = handle

FileNotFoundError: Could not find module 'C:\Users\ryan\miniconda3\envs\pytraction\Library\bin\geos_c.dll' (or one of its dependencies). Try using the full path with constructor syntax.
rg314 commented 3 years ago

This can be solved by

https://stackoverflow.com/questions/13144158/python-geos-and-shapely-on-windows-64

conda install shapely

This is an on going discussion from shapely https://github.com/Toblerity/Shapely/pull/1108

rg314 commented 3 years ago

Same issue again from pip install