what version of arcgis am I running?

491
2
04-22-2020 02:35 PM
JesseJosserand
New Contributor III

I found How To: Determine the installation location and version of ArcGIS Desktop using Python 

...with a python script to determine version and installation location but it fails with a syntax error.

python3.7 test.py
File "test.py", line 10
print "%s : %s" % (k, d)
^
SyntaxError: invalid syntax

...test.py is a copy of the provided python script at that link above.

How can I determine the following...

1. what is my current arcgis version?

2. where is it installed?

3. what is the best practice architecture?

I ask the third question because in 3 environments I work with, none of them have identical architecture and that is very frustrating. The goal, per my management, is to have the arcportal user own everything and not to have an arcserver user at all. Is that a reasonable architecture and if NO then what is the best practice for that???

I'm a 49 year IT veteran with many years of Linux, PHP, MySQL, Oracle, PostgreSQL, Python, and mass-quantities of other related experience, but am new to esri and arcgis.

Please help! I work for GDIT, but have to use my personal email for these communications due to the security level of that which I support.

Tags (1)
0 Kudos
2 Replies
JoeBorgione
MVP Emeritus

This works for me (I'm using python 3.x; if you are using 2.x the f string in the print function won't work.  use format() instead)

import arcgisscripting

gp = arcgisscripting.create(93)

d = gp.GetInstallInfo('desktop')
keys = d.keys()
# i had to drop the keys.sort()

for k in keys:
    print(f'({k} {d}')  
    
(LicenseLevel Advanced
(InstallDir c:\program files\arcgis\pro\
(Installer JBorgione
(ProductName ArcGISPro
(Version 2.5
(SourceDir C:\Users\jborgione\Documents\ArcGIS Pro 2.5\ArcGISPro\
(InstallType N/A
(BuildNumber 22081
(InstallDate 4/2/2020
(InstallTime 14:13:35
(SPNumber N/A
(SPBuild N/A‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍
That should just about do it....
0 Kudos
JesseJosserand
New Contributor III

Thank you. I’m using python3.7 and will give that a try.

<https://www.teksynap.com/>

Jesse F. Josserand | Sr. Systems Architect/System Administrator

M: 601-590-0304 | 😧 228-469-2019 | jesse.josserand@teksynap.com<mailto:jesse.josserand@teksynap.com>

www.TekSynap.com<https://www.teksynap.com/> | 1760 Reston Parkway, Suite 515, Reston VA 20190

Assigned to GDIT Project, 294 Thames Avenue, Bay St. Louis, MS 39520

Jesse.Josserand@GDIT.com<mailto:jesse.josserand@gdit.com>

<https://www.linkedin.com/company/teksynap/>

|

<https://www.teksynap.com/teksynap_signatures/Jesse_Josserand/?vcard=1>

0 Kudos