[FWTools] Problems with gdal, no modul named _gal (FWtools)

Frank Warmerdam warmerdam at pobox.com
Thu Nov 3 14:15:50 EST 2011


Christian,

Yes, working within the FWTools shell should ensure that
everything python related is handled properly.  This depends
on using the FWTools python.exe as well as having the various
environment settings.  How are you launching gdal_merge.py?

The preferred way in FWTools is to just do something like:

gdal_merge -o mosaic.tif in1.tif in2.tif

This should trigger the FWTools\bin\gdal_merge.bat script
which will invoke the FWTools python on the FWTools gdal_merge.py
script with the environment setup properly.

If you run the gdal_merge.py script directly there is a danger
of the system python being used which might not be a compatible
version with the GDAL python extensions.  Perhaps this is your
problem?

Best regards,
Frank

On Thu, Nov 3, 2011 at 4:09 AM, Christian Andersen
<christianhelring at gmail.com> wrote:
> Hi,
>
> I´ve been trying to merge about 10 ecw files into a geotiff using the
> gdal_merge.py script. I´ve tried with several versions of FWtools (in
> the FWtools shell) and the osgeo distribution (newest version) with
> the same result.
> I´m getting the error message listed below
>
> Traceback (most recent call last):
>  File "C:\PROGRA~1\FWTOOL~1.1\bin\gdal_merge.py", line 31, in <module>
>    import gdal
>  File "C:\PROGRA~1\FWTOOL~1.1\pymod\gdal.py", line 191, in <module>
>    import _gdal
> ImportError: No module named _gdal
>
> Since I can use the other utilties in the gdal distribution I´m
> guessing the error has to do with the python part. Using the FWtools
> shell should elimate the problems with not setting the path correctly
> or?
>
> Regards,
>
> Christian
> _______________________________________________
> FWTools mailing list
> FWTools at lists.maptools.org
> http://lists.maptools.org/mailman/listinfo/fwtools
> http://fwtools.maptools.org/
>



-- 
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up   | Frank Warmerdam, warmerdam at pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush    | Geospatial Software Developer


More information about the FWTools mailing list