Using/compiling pyuno with Python 3.6

Michael Torrie torriem at gmail.com
Mon Mar 27 22:36:08 EDT 2017


On 03/27/2017 05:40 AM, filtered wrote:
> I am running CentOS 7.1 with LibreOffice 5.0.6.2.
> 
> I have installed the official pyuno package from CentOS.
> 
> I installed Python 3.6.1 from the sources and now I am trying to import
> pyuno which fails with
> 
> ajung at dev.zopyx.com:~/src/docx> bin/python
> Python 3.6.1 (default, Mar 27 2017, 13:27:24)
> [GCC 4.8.5 20150623 (Red Hat 4.8.5-11)] on linux
> 
> ajung at dev.zopyx.com:~/src/docx> bin/python -c "import uno"
> Traceback (most recent call last):
>  File "<string>", line 1, in <module>
>  File "/home/ajung/src/docx/uno.py", line 24, in <module>
>    import pyuno
> ImportError: dynamic module does not define module export function
> (PyInit_pyuno)
> 
> Is there a straight forward way for compiling pyuno myself? I could not
> find any official documentation,
> links to various posts are older than 5 years...

Pretty sure PyUno is Python 2 only.  Looks like there might be an
alternative in the form of unotools:
https://pypi.python.org/pypi/unotools



More information about the Python-list mailing list