While I try to load the arcpy module in arcGIS 10.3.1 I get the following error message:

    Runtime error 
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "c:\program files (x86)\arcgis\desktop10.3\arcpy\arcpy\__init__.py", line 24, in <module>
    from arcpy.toolbox import *
  File "c:\program files (x86)\arcgis\desktop10.3\arcpy\arcpy\toolbox.py", line 359, in <module>
    from .management import Graph, GraphTemplate
  File "c:\program files (x86)\arcgis\desktop10.3\arcpy\arcpy\management.py", line 26, in <module>
    import _management
  File "c:\program files (x86)\arcgis\desktop10.3\arcpy\arcpy\_management.py", line 14, in <module>
    import _graph
  File "c:\program files (x86)\arcgis\desktop10.3\arcpy\arcpy\_graph.py", line 27, in <module>
    import numpy
ImportError: No module named numpy

How to fix this?

  • Have you installed other version of python instead of one that comes with arcmap? – SIslam Jun 1 '16 at 10:31
  • Yes I have install the stand alone version of python 2.7.11 – Dimitris Kasabalis Jun 1 '16 at 10:35
  • 1
    Please edit the question to specify the installation prh used for Pythom 2.7. I'd recommend uninstall/reinstall, making sure there are no spaces in the PATH. – Vince Jun 1 '16 at 10:35
  • What was in the code snippet that you ran to get that error? – PolyGeo Jun 1 '16 at 10:49
  • 1
    @GISFORESTRY Please, answer you own question, so other people can handle this problem too. – Mr. Che Jun 1 '16 at 11:09

Finally I manage to fix this problem by unistalling the standalone version of python 2.7.11, and now everything works great.

  • 1
    This is exactly the problem, and it is also how you can reproduce it -- run the Visual Studio 2017 installer and telling it to install 32-bit Python 2.7 will cause the problem. VS installed a copy of Python into C:\Python27. When I ran "Field Calculate" in ArcMap 10.5, it started using C:\Python27\python.exe instead of the version installed by ESRI's installer which is in "C:\Python27\ArcGIS10.5". (IMO this is an ESRI bug, they should check for their own version FIRST.) Simply reinstalling ArcGIS Desktop WILL NOT fix this problem unless it removes C:\Python\python.exe – brian h wilson Jan 25 '18 at 23:55

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