Hello,
I'm trying to use irods 4.3.0 on Debian Bullseye with the Python rule engine, but this leads to errors that look like a conflict between python2 and python3:
{"log_category":"legacy","log_facility":"local0","log_level":"error","log_message":"caught python exception: Traceback (most recent call last):\n File \"/usr/lib/python3.9/decimal.py\", line 3, in <module>\n from _decimal import *\nImportError: /usr/lib/python3.9/lib-dynload/_
decimal.cpython-39-x86_64-linux-gnu.so: undefined symbol: PyFloat_Type\n\nDuring handling of the above exception, another exception occurred:\n\nTraceback (most recent call last):\n File \"/etc/irods/core.py\", line 11, in <module>\n import exifread\n File \"/usr/lib/python3/dist-packages/exifread/__init__.py\", line 8, in <module>\n from .classes import ExifHeader\n File \"/usr/lib/python3/dist-packages/exifread/classes.py\", line 7, in <module>\n from .utils import Ratio\n File \"/usr/lib/python3/dist-packages/exifread/utils.py\", line 7, in <module>\n from fractions import Fraction\n File \"/usr/lib/python3.9/fractions.py\", line 6, in <module>\n from decimal import Decimal\n File \"/usr/lib/python3.9/decimal.py\", line 8, in <module>\n from _pydecimal import *\n File \"/usr/lib/python3.9/_pydecimal.py\", line 440, in <module>\n import contextvars\n File \"/usr/lib/python3.9/contextvars.py\", line 1, in <module>\n from _contextvars import Context, ContextVar, Token, copy_context\nImportError: /usr/lib/python3.9/lib-dynload/_
contextvars.cpython-39-x86_64-linux-gnu.so: undefined symbol: PyContextVar_Type\n","server_host":"ust4hpc-data1","server_pid":192378,"server_timestamp":"2023-06-20T15:07:22.806Z","server_type":"agent"}
Undefined symbols come from python3.9 but the rule engine is linked to python2.7.
On previous versions of irods, boost was linked to python2.7:
# irods 4.2.11 on Xenial:
/opt/irods-externals/boost1.67.0-0/lib/libboost_python27.so.1.67.0
# irods 4.3.0 on Bullseye:
/opt/irods-externals/boost1.78.0-0/lib/libboost_python39.so.1.78.0
I think that either the python plugin should be linked to python3.9 or boost should be compiled with python2.7, am I wrong?
How to use the python rule engine with irods 4.3.0 on Debian/Bullseye with the provided packages?
Regards