Select to view content in your preferred language

Python Does Not Open Through Start Menu -> ArcGIS

700
4
06-27-2012 03:58 PM
TomKissane
Emerging Contributor
Hello,

I am relatively new to GIS and very new to the world of Python Scripting.  Here's my issue:  I downloaded the newer standalone version of Python a little while back not realizing that 2.6.5 was already on my system in the ArcGIS folder.  My guess is that when I downloaded the newer version (3.2), it may have removed previous versions that were already installed (2.6.5).  So, when I go into ArcGIS -> Python 2.6 -> IDLE (Python GUI) on the start menu, nothing comes up and says that pythonw.py cannot be found.  So I don't know if I have to load the program on all over again or what.

Any help would be much appreciated!

Thanks,
Tom
Tags (2)
0 Kudos
4 Replies
MarcinGasior
Frequent Contributor
ArcGIS supports only the Python version which was installed with it. Python 3.2 won't be working correctly with ArcGIS 10.

Python 2.6 is installed by default in "C:\Python26". Check if you have this folder. If not, I think, an option is to uninstall 3.2 and reinstall 2.6.5.

For writing and debugging scripts I recommend PyScripter x32.
0 Kudos
TomKissane
Emerging Contributor
Thanks for answering M... here's an update: I was able to copy the IDLE for 2.6.5 from C:/python26 into the ArcGIS folder and it seems to work.  The main problem that I am having right now is that I am unable to import arcpy.  It comes back with a traceback error and says 'no module named arcpy'.  I tried copying the arcpy folder (found in the ArcGIS folder) into the python26 folder and was still unable to import the module.  I am very confused as to how I can import arcpy.
0 Kudos
AnthonyTimpson2
Regular Contributor
Thanks for answering M... here's an update: I was able to copy the IDLE for 2.6.5 from C:/python26 into the ArcGIS folder and it seems to work.  The main problem that I am having right now is that I am unable to import arcpy.  It comes back with a traceback error and says 'no module named arcpy'.  I tried copying the arcpy folder (found in the ArcGIS folder) into the python26 folder and was still unable to import the module.  I am very confused as to how I can import arcpy.


You are in the wrong folder.. the other responder was not specific enough..

The Python install you are concerned with is inside the ArcGIS10.0 Folder, In the python26 folder.. if you put everything in there you should be ok.

C:\Python26\ArcGIS10.0
0 Kudos
TomKissane
Emerging Contributor
Hi Anthony,

Thanks for the answer.  I think I got one step closer to figuring out the problem, but I still get the message,

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


As recommended, I removed python 3.2 from my computer.  And did my best to follow the directions on given on the thread: http://forums.arcgis.com/threads/23230-quot-ImportError-No-module-named-arcpy-quot-PYTHON

Therefore, I now only have the 32-bit version of Python 2.6.5 installed. But was unable to find any paths that had to do with python in the set menu in command prompt.

I also have several folders set up in the following ways:

C:\python26\ArcGIS10.0\arcpy
C:\Program Files (x86)\ArcGIS\Desktop10.0\arcpy
C:\Program Files (x86)\ArcGIS\Desktop10.0\python26

The rabbit hole just seems to get deeper and deeper...
Any help would be very deeply appreciated!

Thanks,
Tom
0 Kudos