import arcpy Fail!

371
7
01-31-2014 07:23 AM
BradJones
New Contributor III
I'm a python beginner.  When I try to import arcpy in pythonwin I get this:

>>> import arcpy
Traceback (most recent call last):
  File "<interactive input>", line 1, in <module>
ImportError: No module named arcpy
>>>

I run a 64bit machine with and use ArcGIS 10.0 and Python 2.7.

Thanks in advance.
Tags (2)
0 Kudos
7 Replies
MichaelVolz
Esteemed Contributor
You might be running the 64-bit python.  You need to ensure you are calling the 32-bit python.
0 Kudos
BradJones
New Contributor III
I am running 64bit.  I'm in the process of changing to 32 and try that.
0 Kudos
JoshuaChisholm
Occasional Contributor III
Hello Brad,

I think Michael might be right on. It's really easy to end up with multiple installs of python. I've had that issue before. One thing I'd recommend trying is importing arcpy in the IDLE interface that was installed with ArcMap (Start > All Programs > ArcGIS > Python 2.7 > IDLE (Python GUI)).

Good luck!
0 Kudos
BradJones
New Contributor III
I installed the 32bit version and am still getting:

PythonWin 2.7 (r27:82525, Jul  4 2010, 09:01:59) [MSC v.1500 32 bit (Intel)] on win32.
Portions Copyright 1994-2008 Mark Hammond - see 'Help/About PythonWin' for further copyright information.
>>> import arcpy
Traceback (most recent call last):
  File "<interactive input>", line 1, in <module>
ImportError: No module named arcpy
>>>
0 Kudos
MichaelVolz
Esteemed Contributor
Has python been installed to c$\Python27\ArcGIS10.0 for the 32-bit version

and

to c$\Python27\ArcGISx6410.0 for the 64-bit version

You should find python.exe and pythonw.exe in these subdirectories.
0 Kudos
BradJones
New Contributor III
it was multiple versions.  I installed 2.7 (with PythonWin) when I had 2.6 already.
All is good. 
Thanks
0 Kudos
LucasDanzinger
Esri Frequent Contributor
Do you have Python 2.7 and ArcGIS 10.0? I believe ArcGIS 10.0 shipped with Python 2.6. I'd take a look at the bottom of this help page, as it shows you the .pth file you need to direct Python to the arcpy installation location - http://help.arcgis.com/en%20/arcgisdesktop/10.0/help/index.html#//002z00000008000000

Edit-
Nevermind, glad you figured it out.
0 Kudos