I have been working in a 60 machine GIS lab recently, which had ArcGIS 10.2 installed on every machine and working properly. I was involved with the installation of some other GIS-related software that required Python 2.7 to be installed globally on each machine (in C:\Python27). We added that path to the PATH environment variable as usual. However, now running Raster Calculator in ArcMap results in an import error for numpy.

What is bizarre to me is that ArcGIS already has its own python installed inside of C:\Program Files (x86)\ArcGIS\etc..... which does indeed have numpy (I've checked). When I open ArcMap and use the python console, import numpy works fine, which I take to mean that the python console is using the inside-of-arcgis Python installation, not the new global one.

The Raster Calculator numpy import error goes away by simply pip installing numpy into the new global Python.

Can anyone confirm that when it comes to raster calculator, ArcMap looks outside of the internal ArcGIS python and tries to use the global one?

If so, is there a good reason for this?

Is there something I am missing here?

  • this may be related to gis.stackexchange.com/questions/103778/… – Michael Mar 28 '17 at 5:08
  • 1
    Do an Installation Repair of ArcGIS Desktop which should fix where ArcGIS finds its different python modules. This is a fairly common problem when a separate (non-ArcGIS) python is installed on a machine – Midavalo Mar 31 '17 at 0:19
  • @Midavalo, it's actually easier to just pip install numpy into the global python on all the computers, I just wanted to ask the question to see if anyone had insight on where in ArcGIS there are calls to global python if it exists, and why that would supercede the ArcGIS local python. – mr.adam Mar 31 '17 at 8:17

Your Answer

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

Browse other questions tagged or ask your own question.