Select to view content in your preferred language

python idle not working and issues with import arcpy

792
1
Jump to solution
12-20-2010 10:17 AM
NathanJennings
Regular Contributor
I just upgraded to ArcGIS 10.  Ran the install.  Installed most of the extensions as well as the Python 2.6.5 in the default.  Everything installed fine.  I can bring up the Python shell inside of ArcGIS, but I want to bring up Python IDLE to do scripting like I have been able to in the past.  I do have Python 2.5 and 2.4 currently installed as well since some of the work I do uses older versions of Python.

When I go to Start Program--ArcGIS--Python2.6--Python IDLE, nothing happens.

In addition, I ran Python from command line and then ran the import arcpy at the Python prompt and I received a message that the module did not exist.  Running the same command within ArcGIS and the Python shell works fine.

Any help would be great, since I will likely have students with the same problem.  I would hope the launching of IDLE from within the Start Programs would work without issue. 

Is there any special reason why Python 2.6 needs to have ArcGIS10.0 subdirectory with all of the Python install files?  I may need Python 2.6 for other needs and would like to have Python usable for more than just ArcGIS.

Thank you for any insight, feedback.
Nate

Also, can
Tags (2)
0 Kudos
1 Solution

Accepted Solutions
NathanJennings
Regular Contributor
I solved my problem.  I have 2.4 and 2.5 on my system that I use for writing code for other purposes and that I have not removed yet.  I did have to change my path variable to indicate

c:\PYthon26\arcgis10.0\.; (the semi-colon separates one value from the next in the path)

and I have a PYTHONHOME variable that needed to be set to c:\Python26\arcgis10.0

import arcpy works fine when IDLE appears

I may have to change my PYTHONHOME for other programs that use older versions of Python.

View solution in original post

0 Kudos
1 Reply
NathanJennings
Regular Contributor
I solved my problem.  I have 2.4 and 2.5 on my system that I use for writing code for other purposes and that I have not removed yet.  I did have to change my path variable to indicate

c:\PYthon26\arcgis10.0\.; (the semi-colon separates one value from the next in the path)

and I have a PYTHONHOME variable that needed to be set to c:\Python26\arcgis10.0

import arcpy works fine when IDLE appears

I may have to change my PYTHONHOME for other programs that use older versions of Python.
0 Kudos