1

I am running ArcGIS 10.2.1 on Win7 64bit. I have finished doing an NDVI, and after defining a vegetation presence threshold at 0.05, opened the Raster Calculator (via Map Algebra in the Arc Toolbox) to generate a new raster with a 0 value for no vegetation and a 1 value for vegetation. I'm getting the following error:

Executing: RasterCalculator ""NDVI_ik_06.tif" > 0.05"

ERROR 000539: Error running expression: rcexec() 
Traceback (most recent call last):
  File "<expression>", line 1, in <module>
  File "<string>", line 2, in rcexec
  File "c:\program files (x86)\arcgis\desktop10.2\arcpy\arcpy\__init__.py", line 24, in <module>
    from arcpy.toolbox import *
  File "c:\program files (x86)\arcgis\desktop10.2\arcpy\arcpy\toolbox.py", line 356, in <module>
    from management import Graph, GraphTemplate
  File "c:\program files (x86)\arcgis\desktop10.2\arcpy\arcpy\management.py", line 22, in <module>
    import _management
  File "c:\program files (x86)\arcgis\desktop10.2\arcpy\arcpy\_management.py", line 14, in <module>
    import _graph
  File "c:\program files (x86)\arcgis\desktop10.2\arcpy\arcpy\_graph.py", line 27, in <module>
    import numpy
ImportError: No module named numpy

Failed to execute (RasterCalculator).
Failed at Tue Apr 07 11:24:48 2015 (Elapsed Time: 0.09 seconds)

Any ideas?

  • 2
    The error message is suggesting that it cannot locate the numpy module. Maybe your installation has become corrupted? As an alternative you could achieve what you are trying to do with the reclassify tool. – Hornbydd Apr 7 '15 at 16:20
  • @Hornbydd Thanks for the suggestion - the reclassify worked ok, though I was hoping to solve the calculator problema. How can I check if my installation has become corrupted? – ewenardus Apr 8 '15 at 17:58
1

If you see an

ImportError: No module named numpy

in circumstances like you describe, I think the expedient to getting a working ArcGIS for Desktop installation will be to uninstall/reinstall ArcGIS for Desktop to let it take care of installing and referencing the expected Python and NumPy versions.

This should take less than an hour, and I suspect trying to debug a corrupt NumPy/Python installation will take most of us longer than that with no guarantee of success.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.