I'm having trouble with geos lib in python. I'm using an anaconda venv with Python 3.6 on Windows 10. On one computer, it is running. So I exported the venv and installed the venv on another computer (which worked). But on the other computer, the same code is not running. I'm using geos 3.8.0 and shapely 1.6.4. When I run the code, I get the following error:
*File "..\lib\site-packages\shapely\coords.py", line 8, in <module>
from shapely.geos import lgeos
File "..\lib\site-packages\shapely\geos.py", line 130, in <module>
os.path.join(sys.prefix, "Library", "lib", "geos_c.dll"),
File "..\lib\site-packages\shapely\geos.py", line 56, in load_dll
libname, fallbacks or []))
OSError: Could not find lib geos_c.dll or load any of its variants ['..\\Library\\lib\\geos_c.dll']*
I already tried:
- to reinstall the packages with conda-forge
- use other versions e.g.: geos 3.7.1 and shapely 1.7.0
- copied the geos_c.dll from ..\Library\bin (where it actually exists) to \Library\lib\
- changed the os.path.join in geos.py to os.path.join(sys.prefix, "Library", "bin", "geos_c.dll")
Does anyone know, how to fix this problem so that I can run the code on both computers?
Thanks in advance!