4

Is there a Pythonic way (e.g. arcpy, os) to detect which version of ArcGIS Pro is installed on a machine (e.g. 2.8.1 vs 2.8.2)?

I found a similar question for ArcPy in ArcMap (Detecting format/version of ArcMap toolbox using ArcPy), but am curious if Esri added the functionality. So far, I've looked in arcpy.Describe and os.environ

8

You can use:

arcpy.GetInstallInfo()['Version']

Strip the ['version'] and you'll get back the entire dictionary of ArcGIS Pro info.

2

I very much prefer @KHibma's answer, but it seems os.environ does indeed provide a clue, but not the full story:

import os

environ_details = os.environ
print(environ_details["ESRIACTIVEINSTALLATION"])
### conversely...
print(arcpy.GetInstallInfo()['Version'])

The above prints:

ArcGISPro2.8
2.8.1

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.