Anouncing New Python Path Extension

This post is to announce a new Python Path Extension.

This extension allows LibreOffice to include Python paths that are installed into LibreOffice. In other words you can create a virtual environment, pip install other packages and make those packages available in LibreOffice using this extension.

The Extension can be found on LibreOffice Extensions

3 Likes

Great job, congratulations.

Here is my sytem / LO information:

Version: 24.2.0.3 (X86_64) / LibreOffice Community Build ID: a9077e3fef0a06cb428c7a740a03f33bf70ac6ee CPU threads: 4; OS: Linux 5.15; UI render: default; VCL: gtk3 Locale: en-US (en_US.UTF-8); UI: en-US Calc: threaded

I have just installed the new extension and set my python path:

I check zaz pip and i still get a different path:
image
Can you please advise?

The extension includes (appends) python paths. Its not designed set the python that LibreOffice uses. Mostly you would be adding a site-packages folder and/or your project folder.

And how i can change python used by LibreOffice?

Essentially not possible. On Windows and Mac LibreOffice uses an embedded python. On Linux in FlatPak and Snap no control for this either. Some APT installed LibreOffice Linux versions use the Operating system Python. Not recommend you change Os Python. Finally Some APT Installed versions of LibreOffice also have an embedded python.


In short you would have to build and compile your own version of LibreOffice.

1 Like