如何在LibreOffice中安装或激活PyUno?

2024-05-16 23:59:46 发布

您现在位置:Python中文网/ 问答频道 /正文

如何让Python(任何Python)知道LibreOffice中的PyUno?

当我这样做时:

import uno

python说它不知道模块“uno”。(这个问题是关于。this question。)


Tags: 模块importlibreofficethisunopyunoquestion
3条回答

(2014年更新)

也许最常用的UNO应用程序是document convertion。。。对于这个任务,在现在,你不需要UNO,你可以直接使用

libreoffice --convert-to

关于UNO本身,请参见新的主页http://api.libreoffice.org/

使用python3-uno(或python-uno)的一个很好的例子是Docvert conversorDocvert for py2)。

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.

正如在对您的评论的回复中所说:它是OpenOffice的可选可安装组件。有关安装的详细信息,请参见OpenOffice的Wiki中的Introduction to Python on OOo页面

相关问题 更多 >