and this thread is 5 years old
Please follow the instructions on the following Web Page:
Create a PYTHONPATH variable
http://mattmakesmaps.com/blog/2013/07/10/fixing-arcgis-10-dot-1-python-console-numpy-import-error/
Hi, all -I've just installed ArcMap 9.3.1 and am trying to use numpy in a Python script called from ArcToolbox, but I get this error: <type 'exceptions.ImportError'>: No module named numpy. I know it's installed, and if I bring up a python shell and "import * from numpy" it works fine.Spatial Statistics tools don't work either, some giving the same numpy error as above, others with variations on this:<type 'exceptions.ImportError'>: Bad magic number in C:\Program Files (x86)\lib\subprocess.pyc. Sometimes the error is for random.pyc. So far I've tried reinstalling just python and numpy, didn't help, nor did reinstalling all of 9.3.1. I made sure that there are no older versions of python on the machine and either deleted or renamed every ArcMap/ESRI directory I could find, in case an old setting was hanging around. I'm starting to think that there's a greater problem, as I tried Arc 10 and it was a nightmare, crashing regularly and with missing libraries (functools when trying to use Raster Calculator), when a colleague running the same OS (Windows XP Professional x64) has had none of the same problems with either 9.3.1 or 10.Any ideas would be greatly appreciated...~ Stacie
import sys sys.path.append(<path to numpy>) import numpy
Aangemelde leden kunnen berichten plaatsen, updates volgen en meer. Nieuw hier? Registreer een gratis account.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.