When I try to import numpy, I get the following message.

>>> import numpy
Runtime error 
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "c:\program files (x86)\arcgis\desktop10.1\arcpy\arcpy\__init__.py", line 24, in <module>
    from arcpy.toolbox import *
  File "c:\program files (x86)\arcgis\desktop10.1\arcpy\arcpy\toolbox.py", line 342, in <module>
    from management import Graph, GraphTemplate
  File "c:\program files (x86)\arcgis\desktop10.1\arcpy\arcpy\management.py", line 22, in <module>
    import _management
  File "c:\program files (x86)\arcgis\desktop10.1\arcpy\arcpy\_management.py", line 14, in <module>
    import _graph
  File "c:\program files (x86)\arcgis\desktop10.1\arcpy\arcpy\_graph.py", line 27, in <module>
    import numpy
ImportError: No module named numpy
  • Could you please supply the Python output from the following command: sys.executable ? – Aaron Sep 26 '14 at 18:32
  • 2
    have you tried mattmakesmaps.com/blog/2013/07/10/… – radouxju Sep 26 '14 at 18:38
  • @radouxju This has worked. Thank you so much for this. – Data_101 Sep 26 '14 at 18:47
  • To make your error message available to future searches would you be able to edit your question to copy/paste its text rather than just a picture, please? – PolyGeo Sep 26 '14 at 20:02
  • @PolyGeo sorry, I can;t copy and paste it. Now that it is working, the error doesn't appear. – Data_101 Sep 26 '14 at 22:37

I have purposed @radouxju comment referencing THIS link as the answer to this question for future viewers:

"One solution to this is to explicitly append the PYTHONPATH environment variable to reference the ArcGIS10.1 Python install’s site-packages directory."

enter image description here

  • 1
    Just to let others know. If you install this in 2015 your packages, particularly if you use anaconda install rather than pip install might be installed under users in windows. You need to add that path to the environment and not the one proposed above. – user61301 Oct 25 '15 at 12:32
  • FYI: Pointing to your python27 site-packages when python3 is the default location will break things. – Gabriel Fair Oct 12 '17 at 23:23

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.