[Gdal-dev] just trying to install/import

Mateusz Loskot mateusz at loskot.net
Fri May 19 05:47:27 EDT 2006


Jeremy Freund wrote:
> Mateusz,
> 
> Hi. I asked you a question about the Python root (I want to access 
> gdal modules from PythonWin 2.4). I'm still having issues with this 
> and was wondering if you had a chance to look at my last message and 
> whether or not you can tell what I'm doing wrong. Basically, I'm 
> using os.chdir('C:\Program Files\FWTools1.0.0\pymod'), typing import 
> gdal and getting this error:
> 
> Traceback (most recent call last): File "<interactive input>", line 
> 1, in ? File "C:\Program Files\FWTools1.0.0\pymod\gdal.py", line 191,
>  in ? import _gdal ImportError: DLL load failed: The specified module
>  could not be found.
> 
> Any ideas?

Hi,

NOTE: I'm replying in the your e-mail in the old thread.

First, as I understand the situation is as follows:

1. You have FWTools installed with its pymod and internal distribution
of Python 2.3

2. You want to use GDAL python module with your own installation of
Python 2.4, but not with Python 2.3. shipped with FWTools

3. Your Python 2.4 can find gdal module but additional DLLs are not found.

So, I suppose the problem is with your environment configuration.
On Windows, DLLs are searched in current directory or in paths defined
in PATH environment variable.

You can check it in command line running:

C:\> echo %PATH%

The problem I see is that GDAL's DLLs are not in your path.
Try to add the path to 'bin' directory from FWTools installation dir to
your path.
You can do it from righ-click on My Computer -> Properties menu option
-> Advanced tab -> Environment Variables button.
There you can edit PATH variable and add FWTools bin directory.

Give me some feedback if it works.

Cheers
-- 
Mateusz Łoskot
http://mateusz.loskot.net



More information about the Gdal-dev mailing list