[Gdal-dev] Beginner problem - can't load DLL
mateusz at loskot.net
Sun Nov 5 11:35:48 EST 2006
> what is the detail to set up my IDE to work with the FWTools's python
What do you mean "my IDE"?
> I have modify my set up by it still report can't load Dll.
> I have Edit all the value under Tools|Edit python path| to
> 'C:\\FWTools' like
> but when i check the sys.path it's value like the following message:
> PythonWin 2.3.5 (#62, Feb 9 2005, 16:17:08) [MSC v.1200 32 bit (Intel)]
> on win32.
> Portions Copyright 1994-2004 Mark Hammond (mhammond at skippinet.com.au
> <mailto:mhammond at skippinet.com.au>) - see 'Help/About PythonWin' for
> further copyright information.
>>>> import sys
> ['', 'C:\\WINDOWS\\system32\\python23.zip', 'C:\\FWTools\\bin',
> 'C:\\FWTools\\pymod', 'C:\\Python23\\DLLs', 'C:\\Python23\\lib',
> 'C:\\Python23\\lib\\plat-win', 'C:\\Python23\\lib\\lib-tk',
> 'C:\\Python23\\Lib\\site-packages\\pythonwin', 'C:\\Python23',
>>>> import gdal
> Traceback (most recent call last):
> File "<interactive input>", line 1, in ?
> File "C:\FWTools\pymod\gdal.py", line 191, in ?
> import _gdal
> ImportError: DLL load failed: ÕÒ²»µ½Ö¸¶¨µÄÄ£¿é¡£
I suppose the problem is that GDAL DLL can't be found by your IDE,
whatever the IDE means.
Try to add path where GDAL DLL file lives to system-wide or user's
PATH environment variable.
sys.path represents Python's PYTHONPATH, not Windows PATH where exe and
dll files are searched for.
Alternatively, you can try to open FWTools command line (use shortcut in
Start Menu -> FWTools) and run your IDE from command line, then it should
inherit PATH settings from FWTools shell.
More information about the Gdal-dev