我有一个用python2.7在ubuntu12.04中开发的python项目。它正在使用pyoo和uno安装使用
pip install pyoo
apt-get -y install python-uno
在ubuntu上使用这个项目到14.04。在
{cda>安装时说
python uno包不可用,但被另一个
包裹。这可能意味着软件包丢失,已过时,
或者只能从其他来源获得
但是,以下软件包将替换它:
libreoffice-script-provider-python
所以我安装了apt-get install libreoffice-script-provider-python
b)在Ubuntu14.14上显示以下错误
`Traceback (most recent call last):
File "/data/mdm/rawtoreportv5/ditupload.py", line 3, in <module>
from ditmgmt.ditmt import *
File "/data/mdm/rawtoreportv5/ditmgmt/ditmt.py", line 1, in <module>
import pyoo
File "/usr/local/lib/python2.7/dist-packages/pyoo.py", line 26, in <module>
FORMAT_TEXT = uno.getConstantByName('com.sun.star.i18n.NumberFormatIndex.TEXT')
AttributeError: 'module' object has no attribute 'getConstantByName'
`
我该怎么做才能在Ubuntu14.04和Python2.7上正常运行呢?在
在较新的Ubuntu系统上,在使用Python-UNO bridge时一定要记住使用python3。这些命令在我的系统上起作用:
顺便说一句,即使没有
^{pr2}$pyoo
,只要安装了libreoffice-script-provider-python
,这种方法也应该有效:相关问题 更多 >
编程相关推荐