Skip to main content

Get installed IDEA version with python code

Hi Brian,
Hi at all,

I have specific python code that I put into a python.py file and run it from within IDEA. Now, I would like detect in my python code the installed IDEA version, to be able to do something like

if IDEA_version >= 12:

else:

So how can I get the installed IDEA version from Python code?

Thanks for any help!

Brian Element Tue, 06/17/2025 - 09:32

Hi Bert,

It is fairly simple to obtain as their is a routine in the IDEALib.py module.  If you are running the python from within IDEA, such as through the ribbon or the Run in the Macros tab then this is all the code you need:

import IDEALib as IDEA

print(IDEA.idea_version())

If you are running the python from outside of IDEA then you would have to obtain the IDEALib.py from C:\Program Files\CaseWare IDEA\IDEA\Lib\site-packages and your python would need the pypiwin32 module.  

Hopefully this helps you out a bit.