# coding=utf-8
The import arcpy
OutputTxtFile=r 'D: \ data \ data \ result. TXT'
Arcpy. Env. The workspace=r 'D: \ data \ data'
Rasters=arcpy. ListRasters (" * ")
Mask=r 'D: \ GeoNE \ GISmap \ WE_map SHP'
Print (rasters)
For raster rasters in:
MinResult=arcpy. GetRasterProperties_management (raster, "MINIMUM")
MaxResult=arcpy. GetRasterProperties_management (raster, "MAXIMUM")
MeanResult=arcpy. GetRasterProperties_management (raster, "scheme")
Img_SR=arcpy. The Describe (raster). SpatialReference. Name
MinRes=minResult. GetOutput (0)
MaxRes=maxResult. GetOutput (0)
MeanRes=meanResult. GetOutput (0)
# minRes=STR (minResult)
# maxRes=STR (maxResult)
# meanRes=STR (meanResult)
F=open (outputTxtFile, 'a +') # open a TXT file, and additional information
F.w rite minRes (raster + ", "+ +", "+ +", "+ maxRes meanRes +" \ n ")
Print (" finish ")
Run the above code in the following error:
Traceback (the most recent call last) :
The File "D:/python/pycharmproject/txtdata py", line 2, the in & lt; module>
The import arcpy
The File "D: \ Arcgis \ Desktop10.2 \ arcpy \ arcpy \ set py", line 21, in & lt; module>
The from arcpy. Geoprocessing import gp
The File "D: \ Arcgis \ Desktop10.2 \ arcpy \ arcpy \ geoprocessing \ set py", line 14, the in & lt; module>
The from _base import *
ModuleNotFoundError: No module named '_base'
The Process finished with exit code 1
Bosses give advice or comments, please