I am building my first GeoDjango project, but I am desperate.
I installed PostgreSQL 9 and PostGis 1.5 using the one-click installer on Windows. So there is everything. I set GEOS_LIBRARY_PATH to the full path of libgeos_c-1.dll in settings.py. But when I run manage.py syncdb, I encounter the following errors:
File "C:\Python25\lib\site-packages\django\contrib\gis\geometry\backend\geos.py", line 1, in <module> from django.contrib.gis.geos import \ File "C:\Python25\Lib\site-packages\django\contrib\gis\geos\__init__.py", line 6, in <module> from django.contrib.gis.geos.geometry import GEOSGeometry, wkt_regex, hex_regex File "C:\Python25\Lib\site-packages\django\contrib\gis\geos\geometry.py", line 14, in <module> from django.contrib.gis.geos.coordseq import GEOSCoordSeq File "C:\Python25\Lib\site-packages\django\contrib\gis\geos\coordseq.py", line 9, in <module> from django.contrib.gis.geos.libgeos import CS_PTR File "C:\Python25\lib\site-packages\django\contrib\gis\geos\libgeos.py", line 51, in <module> lgeos = CDLL(lib_path) File "C:\Python25\lib\ctypes\__init__.py", line 348, in __init__ self._handle = _dlopen(self._name, mode) WindowsError: [Error 126] The specified module could not be found
So, I open libgeos.py and check the specified line. It is simply "CDLL (lib_path)". Obviously lib_path is GEOS_LIBRARY_PATH.
So, I am creating a simple test:
from ctypes import CDLL lgeos = CDLL('libgeo path')
Still the same problem. Therefore, it simply cannot use CDLL to load this DLL at all using python. At this stage I do not know what to do. Please, help.
source share