[gdal-dev] OsGeo4W gdal_merge.py

Frank Warmerdam warmerdam at pobox.com
Fri Jun 17 23:27:47 EDT 2011


On 11-06-17 07:27 PM, Kurt Menke wrote:
> Hello,
>
> I have gdal installed via OSgeo4W including gdal-python.
>
> I am trying to run gdal_merge.py from the OSGeo4W Shell and get the following
> error:
>
> Traceback (most recent call last):
>
> File "C:\OSGeo4W\bin\gdal_merge.py", line 32, in <module>
>
> import gdal
>
> File "C:\OSGeo4W\apps\openev\pymod\gdal.py", line 191, in <module>
>
> import _gdal
>
> ImportError: No module named _gdal

Kurt,

The hint is the openev in the path.  It turns out if you run openev from
the OSGeo4w command shell it modifies the python path to point to it's
private tree which screws up later normal python stuff.  Just close the
shell and restart it and you should be good.

I have issued an updated version of OpenEV in OSGeo4W that should not
have this problem as the openev.bat restores the PYTHONPATH and
PYTHONHOME environment variables.

Best regards,
-- 
---------------------------------------+--------------------------------------
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 Programmer for Rent



More information about the gdal-dev mailing list