My GDAL is showing strange behaviour when I try to use ".py" functions from the command line:
1. For example, when I run gdalinfo --version
, I get the standard response:
GDAL 1.11.3, released 2015/09/16
2. Also when I run gdalwarp
, I get the standard response showing me the flags and everything.
3. Problem:
However, when I run gdal functions with a .py extension, for example gdal_polygonize.py
, I get the following:
Traceback <most recent call last>:
File "C:OSGeoW64ingdal_polygonize.py", line 36, in <module>
import gdal, ogr, osr
ImportError: No module named gdal
I checked my Path variable, reinstalled python and gdal, but nothing worked.
When I run the gdal_polygonize.py
function from my QGIS it works. I just can`t use it from my command line.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…