Question
· Oct 13, 2023

Python Integration Issues on Remote IRIS Server

Hi everyone, 

I'm attempting to compile a basic Python code on a remote server, but it appears that the compiler doesn't recognize the language.

The remote server is running a virtual machine with Oracle Linux Server 7.9 (64-bit), and it has IRIS for UNIX (Red Hat Enterprise Linux for x86-64) 2021.1 (Build 215U) [HealthConnect:3.3.0] installed.

When I try to compile a script that includes a Python ClassMethod, such as this "testpy.cls":

ClassMethod python() As %Status [ Language = python ]
{
    # prova python
    print("hello world")
}

This error returns (Error #5486: Invalid method language / Error #5030 An error occurred while compiling class '<className>'): 

Compilation started on 10/13/2023 17:01:41 with qualifiers 'cuk'
Compiling class <className>
ERROR #5486: Invalid method language: <className>:MethodName:python
  > ERROR #5030: An error occurred while compiling class '<className>'
Detected 1 errors during compilation in 0.090s.

I've attempted to follow the instructions provided on this page: Python Prerequisites, but I couldn't resolve this problem. The problem persisted, even after executing "sudo su -" command to obtain root privileges before trying to install python3 or a python package, like numpy, through the command "yum install python3".

I also attempted to write some ObjectScript code, recalling ##class(%SYS.Python).Builtins() or ##calls(%SYS.Python).Shell(), such as: 

ClassMethod HelloWorld() As %Status
{
    set pythonBuiltins = ##class(%SYS.Python).Builtins()
    do pythonBuiltins.print("hello world")
}

However, I encountered an error indicating that these methods do not exist.

The same Python codes work fine on my local instance of IRIS and I can't figure out why they doesn't work on the remote server instance.

I've identified the path of the Python packages folder on my computer (C:\InterSystems\IRISHealth\mgr\python) and noticed the only big difference between the local and remote instances. While the local folder includes several subfolders (such as numpy, pandas, etc.), the corresponding folder on the remote server (u01/<instanceName>/mgr/python) is empty, despite multiple attempts to install python3 and packages like numpy or pandas, even if executed directly from the mgr/python folder. 

It is like Python and its packages are installed but invisible. In fact, if I try to run the command yum install python3 again, it returns this message, even if the folder is still empty:

Loaded plugins: langpacks, ulninfo
Package python3-3.6.8-19.0.1.el7_9.x86_64 already installed and latest version
Nothing to do

I've tried to clean some space on the remote server and re-tried the installation with 2.5 Gb of free space available, but nothing changed. 

Does anybody know how to handle this?

Product version: IRIS 2021.1
Discussion (4)1
Log in or sign up to continue