Select to view content in your preferred language

64 Bit Geoprocessing with Python

834
4
Jump to solution
02-15-2013 04:39 AM
MichaelVolz
Esteemed Contributor
To All Python Users:

From what I have read on the forum, 64 bit geoprocessing is available with python with ArcGIS Desktop v10.1.  I would like to make use of this capability on a 64 bit machine.  I see 2 versions of python27 on this machine at:

C:\Python27\ArcGIS10.1

C:\Python27\ArcGISx6410.1

How can I determine if my python script run in IDLE is using the 64 bit python geoprocessing capability?

Any help or hints is greatly appreciated.  Thank you.
Tags (2)
0 Kudos
1 Solution

Accepted Solutions
T__WayneWhitley
Honored Contributor
Oh right, that has been another problem - you have to use a fully-qualified path to your connection file.

That is, take out 'Database Connections' and use the full pathname string to your app data directory, if that is where your connection file is (you may copy it out to make it accessible from elsewhere, which is typically what I do for Server scripts anyway).


Enjoy,
Wayne

View solution in original post

0 Kudos
4 Replies
T__WayneWhitley
Honored Contributor
I thought this was a good blog about it:

http://blogs.esri.com/esri/arcgis/2012/11/12/python-scripting-with-64-bit-processing/

...and essentially you can 'qualify' which exe, 32- or 64-bit, you want to use.  And there's a print statement too you can use, executing from cmd line:

print "Running against: {}".format(sys.version)


Enjoy,
Wayne
0 Kudos
MichaelVolz
Esteemed Contributor
Thank you Wayne

Based on the print statement it appears the python script is running as the 64 bit version (I added a PYTHONPATH environmental variable and placed the 64 bit version first in the list).

Unfortunately, the connection I made to a v10.0 SDE database is no longer working in the python script that I am running on the machine with ArcGIS Desktop v10.1.  Has the syntax for using a .SDE connection changed with the new version of python?

In the past I used

INPUT_SDE = "Database Connections\\" + connSDE + "\\"

where connSDE was a string variable that contained an SDE connection such as Development_user.sde

I then used INPUT_SDE as a portion of the first argument in the arcpy.Append_management call where data is pulled from SDE to update a file geodatabase.  The exact SDE featureclass name was added as another variable that is concatenated with INPUT_SDE to create the entire first argument which looks like:

Database Connections\Development_user.sde\EMER.AMBULANCE_STATIONS.

Any help or hints are greatly appreciated.  Thank you.
0 Kudos
T__WayneWhitley
Honored Contributor
Oh right, that has been another problem - you have to use a fully-qualified path to your connection file.

That is, take out 'Database Connections' and use the full pathname string to your app data directory, if that is where your connection file is (you may copy it out to make it accessible from elsewhere, which is typically what I do for Server scripts anyway).


Enjoy,
Wayne
0 Kudos
MichaelVolz
Esteemed Contributor
Thank you Wayne.

That was the answer with the full path to the .sde file instead of the shorthand convention of Database connections.

I guess with the implementation of Windows 7 and Windows Server 2008 and the use of a 64 bit operating system, the .sde connection files could be found in different locations so the shorthand convention was removed.

I will now remember to use the full path to the .sde files for new and upgraded python scripts.
0 Kudos