6

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

Taras
35.7k5 gold badges77 silver badges151 bronze badges
asked Oct 13, 2021 at 17:50

2 Answers 2

11

You can use:

arcpy.GetInstallInfo()['Version']

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

PolyGeo
65.5k29 gold badges115 silver badges349 bronze badges
answered Oct 13, 2021 at 19:52
3

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

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

The above prints:

ArcGISPro2.8
2.8.1
answered Oct 13, 2021 at 22:21

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.