Frequently asked question

Can Python be used to determine what version of ArcGIS is installed?

Last Published: April 25, 2020

Answer

Yes, in the new version of the Geoprocessor Programming Model for ArcGIS 9.3, there is a method that will output the version of ArcGIS that is installed on the machine.

The method is called gp.GetInstallInfo(), and it outputs a python dictionary. The information in the dictionary can be used by other methods in the script.

The items in the dictionary are as follows:

SourceDir: Source directory
InstallDate: Date of installation
SPBuild: Service pack build
ProductName: Product name
BuildNumber: The build number
InstallType: The installation type
Version: The product version
SPNumber: Service pack build number
Installer: Account installed by
InstallDir: Install location
InstallTime: Time of installation

Code:
import arcgisscripting
gp = arcgisscripting.create(9.3)

print gp.GetInstallInfo("desktop")


Note:
There are other installation types that can be used by this method: engine, server .net, and server java.

Sample Output:
Code:
{'SourceDir': u'\\\\data\\ArcGIS_Desktop\\Desktop\\', 'InstallDate': u'6/17/2008',
'SPBuild': u'N/A', 'ProductName': u'ArcGIS Desktop', 'BuildNumber': u'09.30.00.01770', 'InstallType': u'N/A',
'Version': u'9.3', 'SPNumber': u'N/A', 'Installer': u'user123', 'InstallDir': u'C:\\Program Files\\ArcGIS\\',
'InstallTime': u'8:20:21'}

Article ID: 000010241

Software:
  • ArcMap 9 x

Receive notifications and find solutions for new or common issues

Get summarized answers and video solutions from our new AI chatbot.

Download the Esri Support App

Related Information

Discover more on this topic

Get help from ArcGIS experts

Contact technical support

Download the Esri Support App

Go to download options