Hi all
I decided to venture into developing LO macros with python instead of Basic and stumbled upon an issue wrg to a mismatch between ubuntu python version (3.12) and the LO python version (3.10) as (seen in /opt/libreoffice25.2/program/python-core-3.10.16/lib)
The way i discovered this issue was while trying to start a python console from a python script in a macro and getting this error back in journalctl
Original exception was:
Traceback (most recent call last):
File “/usr/bin/gnome-terminal”, line 3, in
import string
File “/opt/libreoffice25.2/program/python-core-3.10.16/lib/string.py”, line 52, in
import re as _re
File “/opt/libreoffice25.2/program/python-core-3.10.16/lib/re.py”, line 125, in
import sre_compile
File “/opt/libreoffice25.2/program/python-core-3.10.16/lib/sre_compile.py”, line 17, in
assert _sre.MAGIC == MAGIC, “SRE module mismatch”
^^^^^^^^^^^^^^^^^^^
Removing python3 from ubuntu for downgrading seems like an impossible mission: the only workaround I found was to replace /opt/libreoffice25.2/program/python-core-3.10.16/lib with a link to the installed python3 library directory.
Does a clean solution exists for aligning the version ?
Ubuntu 24.04.2 LTS
Linux 6.11.0-24-generic
Python 3.12.3 (main, Feb 4 2025, 14:48:35) [GCC 13.3.0] on linux
LO
Version: 25.2.2.2 (X86_64) / LibreOffice Community
Build ID: 7370d4be9e3cf6031a51beef54ff3bda878e3fac
CPU threads: 4; OS: Linux 6.11; UI render: default; VCL: gtk3
Locale: it-CH (en_US.UTF-8); UI: en-US
Calc: threaded