I installed the "gdal-201-1800-core.msi" and "GDAL-2.1.2.win32-py3.4.msi" in WinPython. It looks like the gdal could run in python shell.( there is no error when type "import gdal" ). But I could not use any gdal function such as "GetRasterband()","ReadAsArray". what's wrong with the gdal?
import gdal
import ogr
file=gdal.Open(r'D:\GeoNE\temp\m2000049.tif')
band=file.GetRasterBand(1)
---------------------------------------------------------------------------
AttributeError Traceback (most recent call last)
<ipython-input-4-a8404d484b8e> in <module>()
----> 1 band=file.GetRasterband(1)
AttributeError: 'NoneType' object has no attribute 'GetRasterBand'
gdal. UseExceptions()
to see the error message.