Select to view content in your preferred language

Existing Python 26

2045
11
10-22-2009 03:23 PM
TedCronin
MVP Honored Contributor
Original Post Date: Oct 22, 2009 4:23 PM PDT

So, why is Python being installed inside of Desktop94 for one, and what does this mean for my existing 2.6 install?  Does this mean I actually will have 2 installs of 26, or will I need to remove my NORMAL location?
0 Kudos
11 Replies
RalfGottschalk
Esri Contributor
If you already have Python 2.6.2 installed on your machine, the Python that comes with ArcGIS should not install.  Python is installed in the ArcGIS folder so that it will installed when ArcGIS gets uninstalled.

If you have other Python dependant applications, it is recommended that you install Python on its own and when ArcGIS installs it will see that you have the correct version of Python installed and it should not install. 

I hope this answers your question.

-Ralf
0 Kudos
TedCronin
MVP Honored Contributor
What is the behavior if we happen to do the install for GIS first, and then decide we want an additional library later, will arcpy allow me to easy_install something else, and then have it work with arcpy.

In addition, I just did an install on a machine that has 2.6, and it appears that I now have two installs, not one which is what I would expect based on your comments.  I have two different site-pakages, 2 Libs, 2 of everything (\\Python, and \\Python\ArcGIS9.4) .  I thought if we did the py install, previously, the GIS install for py would observe that prior installation.  This is going to be a problem.  We use alot of xtra modules/packages, and if this is broken, then they are in different sandboxes which may not talk to one another.
0 Kudos
KimOllivier
Honored Contributor
I have been pondering the same issues.

File types do not update correctly to allow editing of scripts using Pythonwin.
The path does not include ArcGIS9.4 on installation.
This was a problem in 9.3 as well. Every Python class has a lesson to configure the system manually so that the editor will work, and the scripts will execute using the correct version of Python.
0 Kudos
JasonScheirer
Esri Alum
The Python 2.6 being installed with 9.4 is the exact same Python 2.6 you would install from python.org. It is just installed to a different path if ArcGIS installs it for you. However, if you install Python 2.6 yourself BEFORE installing 9.4 it will remain in that path.

On Windows, there is the registry key \\HKLM\Software\Python\PythonCore\ with a subkey for every major.minor release of Python (so you will likely have both 2.5 and 2.6 on your machine). If there are parallel versions of 2.6 installed on your machine then it may be a bug, it may be the case that the registry did not have the prior install of 2.6 in it. If it's the former please file it so we can address it for future releases.

As the ArcGIS install of Python is the same as the one available everywhere else, everything will Just Work -- you can download any third party Python modules via your favorite method (.exe installers, easy_install once you configure setuptools) and it will work as expected. You'll also notice that the installer is more Pythonic in 9.4; no more PYTHONPATH environment variable but a .pth file in site-packages to set the Python import path to include arcgisscripting/arcpy.

There will be a utility script available soon for configuring Python file associations.
0 Kudos
TedCronin
MVP Honored Contributor
On a remote machine, which I do not have access to right now, and it installed its own path anyway, even though I have 2.6 installed already, ending up with two copies of python, so then this would be a bug.  I will fill it out later when I get out of the office.  Anything on my end that I can make a note of for your purposes to expediate the correction for this issue.

Thank you jscheirer
0 Kudos
TedCronin
MVP Honored Contributor
Something that did occur to me is I bet, i have py 2.6.1 installed, and you install 2.6.2, and it may not overwrite my 2.6.1 due to the version number change so in a way what you do is good, but if we need everything to play in the same sandbox then maybe bad. 

I am about to install py 2.6.4, and then do an install with your 2.6.2 to see if my hypothesis is correct.
0 Kudos
TedCronin
MVP Honored Contributor
If I was a betting man, I would think that this is the issue at hand, where your install, installs py 2.6.2, and needs that and is locked to that version number, but if I have py 2.6.4, it will not override what I have, so yes this is a limitation for sure.  I just duped on this machine, installed py 2.6.4, then ArcMap with ESRI py, now I get two copies,, so which one do I use, in one corner I have access to py from ESRI, and in the other corner I have access to python from the user community, I suppose next up will be to ensure that my eggs are placed as part of the py26 directory, hopefully, and not the py26\GIS94 directory.  Any workarounds on this without destroying our 26 updates. 

Perhaps, if your install finds a 2.6.1 version, it can go ahead and upgrade to 2.6.2.  If It finds anything above 2.6.2, then lets you know that there are two copies of python on your machine.
0 Kudos
TedCronin
MVP Honored Contributor
I filed this with Support today.
0 Kudos
DavidAllen
Frequent Contributor
Ted - would you like to see a book on python programming in ArcGIS? ... or would you be interested in writing one? The release of ArcPy may mark the correct time for such a project.

David Allen
dallen@eulesstx.gov
0 Kudos