PyB*_*ner 5 python python-2.x pyuno python-2.7
我在Windows 7上安装了python 2.7。我已经安装了python 2.6附带的Libre Office 3.4。因此,即使在设置所有环境变量之后,我也无法导入uno和unohelper。
我需要python 2.7,因此无法还原回python 2.6,因为我之前在开放式办公室3中使用过python 2.6。我最近更改为LibreOffice 3.4和Python 2.7(ActivePython 2.7)。
有什么办法可以使python 2.7导入LibreOffice 3.4的uno和unohelper
提前致谢。
.pyc文件和 C 扩展在 2.6 和 2.7 Python 版本之间不兼容。安装pylauncher并在与 Libre Office 配合使用的脚本中使用 python2.6 shebang。
从答案中提供的链接OpenOffice.orgdevelopment with pyUno for Windows\xe2\x80\x94which Python? 问题:
\n\n\n\n术语:我们将随 OpenOffice 安装的 Python 版本称为“OO-Python”。我们将单独安装的 Python 版本(例如,\nc:\\Python26)称为“System-Python”。
\n\n您需要了解六件事才能成功地将 uno 模块导入\n 您的 System-Python 解释器。1) OO-Python 版本号。您的\n System-Python 版本号必须与您的\n OO-Python 版本号相同。[强调我的]\n ...
\n