Quantcast
Channel: Forums - Python
Viewing all articles
Browse latest Browse all 2485

Import Arcpy error

$
0
0
Hi everyone,
I've searched the forums and the internet for an answer to this, but unfortunately I've had no luck.
I'm running Arc 10.1 sp1

Regardless of whether I use Idle, pythonwin, pyscripter or the built in python editor window in Arc, I get the following error when I try to import arcpy

>>> import arcpy
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
File "C:\Python27\ArcGIS10.1\lib\site-packages\numpy\__init__.py", line 137, in <module>
import add_newdocs
File "C:\Python27\ArcGIS10.1\lib\site-packages\numpy\add_newdocs.py", line 9, in <module>
from numpy.lib import add_newdoc
File "C:\Python27\ArcGIS10.1\lib\site-packages\numpy\lib\__init__.py", line 4, in <module>
from type_check import *
File "C:\Python27\ArcGIS10.1\lib\site-packages\numpy\lib\type_check.py", line 8, in <module>
import numpy.core.numeric as _nx
File "C:\Python27\ArcGIS10.1\lib\site-packages\numpy\core\__init__.py", line 8, in <module>
import numerictypes as nt
File "C:\Python27\ArcGIS10.1\lib\site-packages\numpy\core\numerictypes.py", line 92, in <module>
from numpy.core.multiarray import typeinfo, ndarray, array, \
ImportError: cannot import name datetime_data


The python installation is not a standalone one, it is the one installed when installing Arc,
so in the python27 folder within the C drive, there is only 1 folder, this is ArcGIS10.1.

Therefore I am unable to carry out the fix provided by Kimo in post #2 here
http://forums.arcgis.com/threads/215...ll=1#post10859


I've also looked at the contents of the Desktop10.1.pth file and the file paths seem correct ( as specified in the Tip at the bottom of this page http://resources.arcgis.com/en/help/...00000008000000 )

I have 3 lines in this file, as below:
C:\Program Files (x86)\ArcGIS\Desktop10.1\bin
C:\Program Files (x86)\ArcGIS\Desktop10.1\arcpy
C:\Program Files (x86)\ArcGIS\Desktop10.1\ArcToolbox\Scripts


Any ideas what I can do next to try and get arcpy to be recognised?

Many thanks

Dan

Viewing all articles
Browse latest Browse all 2485

Trending Articles