How do I get ArcGIS to install Python on my current Python install?

2229
6
Jump to solution
02-08-2013 06:09 AM
IanBroad2
New Contributor III
I just did a fresh install of my OS and installed ActivePython 2.7.2.

I want ArcGIS 10.1 to use this Python install.

What are the steps do get this to work?

I can't stand having two separate Python installs for the same version.
Tags (2)
0 Kudos
1 Solution

Accepted Solutions
IanBroad2
New Contributor III
Here's what I ended up doing-

You need to download and install the following libraries before you install ArcGIS 10.1:

NumPy 1.6.1-

http://sourceforge.net/projects/numpy/files/NumPy/1.6.1/numpy-1.6.1-win32-superpack-python2.7.exe/do...

Madplotlib 1.1.1-

http://sourceforge.net/projects/matplotlib/files/matplotlib/matplotlib-1.1.1/matplotlib-1.1.1.win32-...

If you do this, ArcGIS will use your already existing Python 2.7 install.

View solution in original post

0 Kudos
6 Replies
T__WayneWhitley
Frequent Contributor
Shouldn't be a problem as long as you 'qualify' the appropriate python.exe with which to run your scripts.
Your bigger consideration is whether your scripts are compatible with your chosen version of Python....arcpy was developed to run with 2.7 at 10.1, I think, and while there are other versions and flavors, it is generally not recommended to install those as you may run into some unanticipated problems or 'side effects'...

Enjoy,
Wayne
0 Kudos
curtvprice
MVP Esteemed Contributor
I just did a fresh install of my OS and installed ActivePython 2.7.2.

I want ArcGIS 10.1 to use this Python install.

What are the steps do get this to work?


I have EPD and have chosen, to avoid issues, to go ahead and install both pythons and add a reference to the EPD modules in my site-packages folder on the ArcGIS-python install. However, if you want to try this out, here are my suggestions:

Option 1. Do a custom install of ArcGIS, turning off Python install option. (If you've already installed, you can do a repair install to remove features; remove the Python feature.) You may have to do a repair install of ActivePython to make sure .py files are executable so ArcGIS can find them.

A wrinkle: you need to make sure to arcpy is available in your sys.path in your ActivePython setup.

file Lib\site-packages\Desktop10.1.pth (should be dropped in your ActivePython site-packages folder):
D:\Users\cprice>type c:\Python27\ArcGIS10.1\Lib\site-packages\Desktop10.1.pth
C:\ArcGIS\Desktop10.1\bin
C:\ArcGIS\Desktop10.1\arcpy
C:\ArcGIS\Desktop10.1\ArcToolbox\Scripts



Option 2. The ArcGIS Desktop installer looks for a registry keys to see if Python is already  installed. My guess is ActivePython is not populating this key, while the generic Python install does. This involves editing the registry and guessing at the checks in the Esri's setup.msi, so I feel this is less desirable -- unless you open an incident and get some help from Esri.

HKLM\SOFTWARE\Python\PythonCore\2.7\InstallPath\InstallGroup
0 Kudos
VeniaminPapadopoulos
New Contributor
Thank you for the helpful tip.
I was wondering, however, if the desktop.pth file would accept a network path.

I would like to have my programming machine separate from my GIS machine, for example.
PC1 has ArcGIS Desktop and PC2 has Python and the Eclipse IDE.

So would it be possible to make PC2 find and use arcpy from PC1?
Or alternatively, is there some way to just copy arcpy over and instruct it where to find the license information?
0 Kudos
curtvprice
MVP Esteemed Contributor
Thank you for the helpful tip.
I was wondering, however, if the desktop.pth file would accept a network path.

I would like to have my programming machine separate from my GIS machine, for example.


I haven't tried it, but I would think it quite unlikely that arcpy would work without ArcGIS installed on the computer on which you are executing your script. ArcPy is an interface to communicate with ArcGIS, not a standalone python package.
0 Kudos
VeniaminPapadopoulos
New Contributor
Thanks. Useful to know that!

Update: I tried it and, like you suggested, it does not work.
It does find the arcpy through the network but Python throws errors.
0 Kudos
IanBroad2
New Contributor III
Here's what I ended up doing-

You need to download and install the following libraries before you install ArcGIS 10.1:

NumPy 1.6.1-

http://sourceforge.net/projects/numpy/files/NumPy/1.6.1/numpy-1.6.1-win32-superpack-python2.7.exe/do...

Madplotlib 1.1.1-

http://sourceforge.net/projects/matplotlib/files/matplotlib/matplotlib-1.1.1/matplotlib-1.1.1.win32-...

If you do this, ArcGIS will use your already existing Python 2.7 install.
0 Kudos