Home > front end >  How update Libre Office Python on windows?
How update Libre Office Python on windows?

Time:02-19

LibreOffice on windows comes with it's own Python version. How can one install new packages for LibreOffice-Python.

I use Linux myself and I've written a working macro that I would like to be usable for windows users as well, but it uses packages that aren't available in standard LibreOffice.

We tried updating by pip, but as expected it only updates the system's python. We are aware that zazpip exists, but apparently it didn't work with the tester. Therefore I am explicitly looking for other solutions.

CodePudding user response:

If it comes with a specific version of Python, it may need to reference specific functions from that version. The best answer I can give you is: If Python is included in the source code, try forking the source code with your own version of Python, and compiling that.
Or,
If there's a specific package manager for Python included, try using that to update Python.

CodePudding user response:

A discussion of what others have tried is at https://ask.libreoffice.org/t/install-python-package-for-libre-office/66934/16. I doubt you'll find any better answers than what is described there. Try the various approaches and see what works for your situation.

I did get it to work once but it wasn't easy—some environment variables needed to be set in my case.

Is there a way to write your macro so that it does not depend on a separate package? That is what I ended up doing. You can implement part of the package yourself if needed. In the end it wasn't so bad, and it works on all operating systems.

  • Related