tkoo02

Problem importing Arcpy

Discussion created by tkoo02 on Jul 12, 2012
Latest reply on Jul 12, 2012 by SolomonP
Hello,

I am relatively new user of ArcGIS (a couple of years), and very new to the python language.   I am doing what I can, but I can't seem to get very far because I can't import arcpy.

Here is what my screen looks like using PythonWin:

PythonWin 2.6.5 (r265:79096, Mar 19 2010, 21:48:26) [MSC v.1500 32 bit (Intel)] on win32.
Portions Copyright 1994-2008 Mark Hammond - see 'Help/About PythonWin' for further copyright information.

>>> import sys
>>> import arcpy
Traceback (most recent call last):
  File "<interactive input>", line 1, in <module>
ImportError: No module named arcpy
>>> sys.path
['', 'C:\\Windows\\system32\\python26.zip', 'C:\\Python26\\ArcGIS10.0\\DLLs', 'C:\\Python26\\ArcGIS10.0\\lib', 'C:\\Python26\\ArcGIS10.0\\lib\\plat-win', 'C:\\Python26\\ArcGIS10.0\\lib\\lib-tk', 'C:\\Python26\\ArcGIS10.0\\Lib\\site-packages\\pythonwin', 'C:\\Python26\\ArcGIS10.0', 'C:\\Python26\\ArcGIS10.0\\lib\\site-packages', 'C:\\Python26\\ArcGIS10.0\\lib\\site-packages\\win32', 'C:\\Python26\\ArcGIS10.0\\lib\\site-packages\\win32\\lib']
>>> sys.path.append('C:\\Program Files (x86)\\ArcGIS\\Desktop10.0\\Bin')
>>> sys.path.append ('C:\\Program Files
>>> (x86)\\ArcGIS\\Desktop10.0\\ArcToolBox\\Scripts')
>>> sys.path.append('C:\\Program Files
>>> (x86)\\ArcGIS\\Desktop10.0\\Arcpy')
>>> import arcpy
Traceback (most recent call last):
  File "<interactive input>", line 1, in <module>
ImportError: No module named arcpy


I only figured out that I needed to append the last 3 paths after working with a colleague and his screen showed those paths, while mine didn't.  I would like to get it to where I don't have to append anything and I can just start coding.

Also, before when I tried it, it said that it could not find the file arcgisscripting.  I was able to find the file folder that contained arcgisscripting, but the file itself was empty.

Would my best bet just be to reload ArcGIS 10, or should I be able to work around that?

I do have Multiple versions of Python on my 64-bit system, but I don't know that this is what is interfering as I am using 2.6.5 with ArcGIS.  I just have no idea what is going on. Any help would be much appreciated.

Thanks,
Tom

Outcomes