How do you install or activate PyUno in LibreOffic

2019-02-14 01:57发布

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

When I do:

import uno

python says that it knows no module "uno". (This question came up re. this question.)

5条回答
做个烂人
2楼-- · 2019-02-14 02:04

Here's what I did:

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

查看更多
一纸荒年 Trace。
3楼-- · 2019-02-14 02:15

As said in the response to your comment there: it's an optional installable component for OpenOffice. See the Introduction to Python on OOo page in OpenOffice's Wiki for installation details

查看更多
Juvenile、少年°
4楼-- · 2019-02-14 02:18

(UPDATING for 2014's)

Perhaps the most used UNO application is document convertion... For this task, in nowadays, you not need UNO, you can use directly

libreoffice --convert-to

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

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

查看更多
狗以群分
5楼-- · 2019-02-14 02:19

Try importing the libre office python extension.

yum install libreoffice-pyuno

查看更多
We Are One
6楼-- · 2019-02-14 02:28

I am having the same issue 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.

查看更多
登录 后发表回答