Article
· Sep 2 2m read

configuration of Flexible Python Runtime Feature in IRIS 2024.2

Hello Community,

This article aims to walk you through the process of setting up and utilizing the Flexible Python Runtime Feature for embedded Python. Prior to version 2024.2, Intersystems IRIS installer included a preinstalled version of Python, You can find the Python libraries and application files located in the \lib\python directory within your IRIS installation folder (for example, C:\InterSystems\IRIS20242\lib\python).

However, starting with version 2024.2, the IRIS installer no longer includes Python installation by default. Consequently, you will not find these files in the aforementioned directory. It is necessary for you to install the required version of Python to effectively work with embedded Python in IRIS.

Let's proceed to configure the flexible runtime feature within my IRIS environment.

I've installed the community version 2024.2 on my machine and I tried to connect the python shell immediately in IRIS terminal.

USER>Write $ZV
IRIS for Windows (x86-64) 2024.2 (Build 247U) Tue Jul 16 2024 09:57:03 EDT
USER>Do $SYSTEM.Python.Shell()
ERROR #5002: ObjectScript error: <OBJECT DISPATCH>Shell+16^%SYS.Python.1 *Failed to Load Python: Check documentation and messages.log, Check CPF parameters:[PythonRuntimeLibrary,PythonRuntimeLibraryVersion], Check sys.path setup in: $INSTANCE/lib/python/iris_site.py.

It throws an error because of missing configuration of PythonRuntimeLibrary and PythonRuntimeLibraryVersion values are empty( note: I already set the PythonRuntimeLibraryVersion version )

Now. I’ve already installed the python 3.12.5 in my system and configure the values in the settings.

PythonRuntimeLibrary  - “C:\Program Files\Python312\python3.dll”
PythonRuntimeLibraryVersion - 3.12

Once it’s configured. I executed the Do $SYSTEM.Python.Shell() again and it successfully get in to the python shell

 

Note: Flexible python runtime feature documentation and as per the documentation. This feature is not supported for all operating system

Discussion (2)2
Log in or sign up to continue