[Gdal-dev] Beginner problem - can't load DLL
Mateusz Loskot
mateusz at loskot.net
Sun Nov 5 11:35:48 EST 2006
ÚO½¨Ã÷ wrote:
> what is the detail to set up my IDE to work with the FWTools's python
> version?
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:
What's Tools|Edit?
> 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
>>>> print(sys.path)
> ['', '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',
> 'C:\\Python23\\lib\\site-packages',
> 'C:\\Python23\\lib\\site-packages\\win32',
> 'C:\\Python23\\lib\\site-packages\\win32\\lib']
>>>> 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.
Cheers
--
Mateusz Loskot
http://mateusz.loskot.net
More information about the Gdal-dev
mailing list