[Osgeo4w-trac] Re: [osgeo4w] #120: gdal_polygonize missing
OSGeo4W
trac_osgeo4w at osgeo.org
Fri Dec 4 15:12:29 EST 2009
#120: gdal_polygonize missing
-----------------------+----------------------------------------------------
Reporter: lutra | Owner: warmerdam
Type: defect | Status: assigned
Priority: major | Component: Package
Version: 1.0 | Resolution:
Keywords: pkg-gdal16 |
-----------------------+----------------------------------------------------
Comment (by jef):
Short diagnostic:
1. The batch files used to spawn qgis call {{{gdal16.bat}}}
1. {{{gdal_polygonize(.bat)}}} is a batch file in {{{apps/gdal-16/bin}}}
1. calling {{{gdal_polygonize}}} from the QGIS' GRASS shell (just for the
environment) gives:
{{{
Traceback (most recent call last):
File "C:\OSGeo4W\apps\gdal-16\bin\gdal_polygonize.py", line 34, in
<module>
import gdal, ogr, osr
File "C:\OSGeo4W\apps\Python25\lib\site-packages\gdal.py", line 2, in
<module>
File "C:\OSGeo4W\apps\Python25\lib\site-packages\osgeo\gdal.py", line 7,
in <module>
ImportError: No module named _gdal
}}}
1. Looks like the {{{PYTHONPATH}}} is messed up somehow
{{{%OSGEO4W_ROOT%\apps\gdal-16\pymod}}} is missing. Interestingly
{{{%OSGEO4W_ROOT%\apps\gdal-16\bin}}} is in the {{{PATH}}}.
1. running {{{gdal16.bat}}} again prepends it to the {{{PYTHONPATH}}} and
{{{gdal_polygonize}}} works.
--
Ticket URL: <http://trac.osgeo.org/osgeo4w/ticket/120#comment:4>
OSGeo4W <http://trac.osgeo.org/osgeo4w>
OSGeo4W is the Windows installer for the OSGeo stack.
More information about the Osgeo4w-trac
mailing list