I'm getting this error:
ImportError: Could not find the GEOS library (tried ""geos_c"", ""libgeos_c-1"").
Try setting GEOS_LIBRARY_PATH in your settings
when I run:
from django.contrib.gis.geos import *
pnt=GEOSGeometry('POINT(23 5)')
print(pnt)
I added GEOS_LIBRARY_PATH = 'C:/Python34/Lib/site-packages/osgeo/geos_c.dll'
in C:\Python34\Lib\site-packages\django\conf\project_template\project_name\settings.py
But still Im getting the same error. How to solve this?
I don't know what is the most correct way to use with Windows, you can try to find solution here, but for ubuntu command:
sudo apt-get install binutils libproj-dev gdal-bin
solved the problem.
P.S. From dock:
The setting must be the full path to the C shared library; in other words you want to use libgeos_c.so, not libgeos.so.
Extension of the library must be *_c.so
Are You sure path is correct? This is My path:
GEOS_LIBRARY_PATH = 'c:\\Program Files\\PostgreSQL\\9.1\\bin\\libgeos_c-1'
You need GEOS from PostgreSQL.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With