We will be migrating from Ask to Discourse on the first week of August, read the details here

Ask Your Question

Where is LO's own python interpreter on linux?

asked 2021-04-30 11:37:40 +0200

deivh gravatar image

I'm trying to connect an IDE (like Geany, Thonny, PyCharm) to LibreOffice so i can open an odt in LO, create a python macro inside the odt file with APSO, modify it within my IDE and have an interpreter and a debug environment.

Every tutorial refers to a libreoffice own python interpreter but i can't seem to find it. Where is it? Libreoffice 7.1, fedora 34, python 3.9

edit retag flag offensive close merge delete


find <libreofficeinstalldir>/program -name "*python*" and tell us where you get LibreOffice from (Fedora, TDF, elsewhere ... on TDF packaging it is part of libobasis7.1-pyuno-

Opaque gravatar imageOpaque ( 2021-04-30 11:42:46 +0200 )edit

libreoffice from fedora. That find command returns many results, should i look for something in particular? besides, Lo python macros are working fine.

deivh gravatar imagedeivh ( 2021-04-30 12:44:44 +0200 )edit

APSO know the interpreter running itself, all you need:

Extras > Extensionmanager > select APSO > Options and choose the path to your Editor, for Example: /usr/bin/geany

edit: AFAIK Fedora-Libreoffice link to there OS-python-environment.

karolus gravatar imagekarolus ( 2021-04-30 13:00:19 +0200 )edit

1 Answer

Sort by » oldest newest most voted

answered 2021-04-30 12:54:11 +0200

jmux gravatar image

TDF releases just bundle an own Python version (as program/python and program/python.bin) , because PyUNO has a C++ component, which must be linked to Python C interfaces. These change between minor versions (there are quite a few

#if PY_VERSION_HEX >= ...

in the LibreOffice source (as pyuno/source/**) with various 0x03080000, 0x03090000 and 0x03040000 tests).

But Linux distros normally have a main Python version, so they compile PyUNO against that, and LO doesn't have to provide its own one.

edit flag offensive delete link more


ok, got it, so on linux there's no need to follow those guides that say u have to set the python path. Thank you

deivh gravatar imagedeivh ( 2021-05-04 15:29:41 +0200 )edit
Login/Signup to Answer

Question Tools

1 follower


Asked: 2021-04-30 11:37:40 +0200

Seen: 45 times

Last updated: Apr 30