Select to view content in your preferred language

install arcpy on 9.3.1?

4426
14
07-21-2010 11:59 PM
runegullstrom
Emerging Contributor
Hi,

I've tried to install arcpy* on my 9.3.1 machine but
when I import arcpy in a script it fails. Is it possible at all?

(*just copied the arcpy dir across from a machine with arcgis 10 and
adjusted all the paths I thought necessary)

regards,

Rune
0 Kudos
14 Replies
ChrisMathers
Deactivated User
No because arcpy requires ArcGIS 10 geoprocessor to be installed. The 9.3.* geoprocessor interfaces with python 2.5 and the 10 geoprocessor interfaces with python 2.6 so there is some version disconnect there as well.
0 Kudos
runegullstrom
Emerging Contributor
Installing the Arcgis 10 geoprocessor, does that involve just copying arcgisscripting.pyd?
If not, is there a hack?

I would like to go through all the mxd's on 4 arcserver machines (dev,tst,etc) to get reports on what mxd's are referring to what fc's. We're not ready to start installing ArcServer 10 on those machines yet.

Referring to my initial post: I not only copied over the arcpy dir and adjusted the paths, I also installed python 2.6

cheers
0 Kudos
ChrisMathers
Deactivated User
Think of arcgisscripting as a com object that calls out to the geoprocessor. When you import arcpy you dont import the geoprocessor just classes that send data into it and get results back from it. The actual geoprocessor is part of the ArcGIS core. If one computer has 10 already why not just run the scripts from there?
0 Kudos
runegullstrom
Emerging Contributor
Thanks,

well, that's what I'm doing now but I have to copy the mxd's to the arcgis10 machine.
I wanted to schedule a task on all boxes to get reports on what fc's are being used by which mxd's/mapservices without manual interference. I have to copy the mxd's to the arcgis10 box because we're restricted in making shares to servers,

cheers
0 Kudos
ClaireInbody
Deactivated User
I want to do the same thing. Did you find a solution for this? I created an arcpy script that needs to run in 9.3.1.
0 Kudos
JasonScheirer
Esri Alum
There is no way to do this; arcpy depends on a significant number of new 10.0 features and links against a new version of Python (2.6, will not be binary compatible with the 2.5 version installed with 9.3).
0 Kudos
ChrisSnyder
Honored Contributor
The v10 arcpy "site-package" and associated functionality is not backwards compatible. There is no "hack" as the code/functionality in arcpy simply does not exist in the v9.3 libraries.

Generally however, the v9.x gp object created with these three different methods IS forward compatible:
gp = win32com.client.Dispatch("esriGeoprocessing.GpDispatch.1") #valid for v9.0, v9.1, v9.2, v9.3, and v10.0
gp = arcgisscripting.create() #valid for v9.2, v9.3, and v10.0
gp = arcgisscripting.create(9.3) #valid for v9.3 and v10.0
0 Kudos
NiklasNorrthon
Frequent Contributor
As other said before there probably isn't a way to make arcpy work in pre 10 verisons.

If the functionallity is really, really, really important and installing 10 is not an option I can see only one obvious way forward: Use ArcObjects programming in VB, .Net or some other language supporting COM. (In theory it is even possilbe to do this in python with the pywin32 package, but that is not a path that I would follow).
0 Kudos
ChrisSnyder
Honored Contributor
Another possibility I have been trying to mess with a bit (with no success BTW):

Use the Telnet (or similar) protocol to in effect run commands on a different box... Seems like most of the Python commands for this sort of thing were written for Unix platforms, but they say they are supported on Windows too. Hmm...

Anyone ever try to do this (Telnet, SSH, or use the "host" parameter with the subproccess module)?

The potential is pretty cool. You could write "grid computing" geoprocessing scripts.
0 Kudos