How to install or activate PyUno in LibreOffice?

How do you know that Python (any Python) knows about PyUno in LibreOffice?

When I do this:

import uno 

python says that he does not know the "uno" module. (This question was raised to the question of this question .)

+5
source share
4 answers

Here is what I did:

inside the LibreOffice directory there is a "program" directory with python.exe, if I use this python (which is in version 2.6.1), I can import uno.

+1
source

As the answer to your comment says there: this is an optional installable component for OpenOffice. See the Introduction to Python page on OOo in the OpenOffice Wiki for installation details.

+2
source

I have the same problem with ubuntu 14.04 and python 2.7.6.

But if you are using ubuntu 12.04, try using sudo apt-get install python-uno.

+2
source

(UPDATE for 2014)

Perhaps the most used UNO application is document conversion ... For this task you currently do not need UNO, you can directly use

 libreoffice --convert-to 

About UNO itself, see the new homepage, http://api.libreoffice.org/

A good example of using python3-uno (or python-uno ) is the Docvert converter ( Docvert for py2 ).

+2
source

Source: https://habr.com/ru/post/919911/


All Articles