Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

OSError: Could not find geos_c.dll or load any of its variants

I'm trying to use shapley, and to use it for what I need it for, I have to import "from shapely import geometry" but I get the error OSError: Could not find lib geos_c.dll

I've tried to install "geos" via "pip install geos", didn't do anything: Requirement already satisfied

pip location: C:\Users\skoft\AppData\Local\Programs\Python\Python37-32\Scripts\pip.exe

import shapely

from shapely import geometry

OSError: Could not find lib geos_c.dll or load any of its variants ['C:\\Users\\skoft\\AppData\\Local\\Programs\\Python\\Python37-32\\Library\\lib\\geos_c.dll'].
like image 490
Skofta Avatar asked Jun 28 '19 20:06

Skofta


2 Answers

I got the same error. My import statement (from shapely.geometry import Point) successfully executed after I manually downloaded the geo_c.dll file from https://www.dll-files.com/geos_c.dll.html and placed it in the bin folder "C:\Users....\Anaconda3\Library\bin".

like image 67
Abhiram Avatar answered Nov 08 '22 11:11

Abhiram


On python 3.8.5 and windows 10. I meet the same error. Then conda install shapely solved the problem for me.

like image 1
sun Avatar answered Nov 08 '22 11:11

sun