Python UNO import on Mac broken

Michael Stahl mstahl at redhat.com
Wed Feb 18 11:53:14 PST 2015


On 18.02.2015 20:32, julien2412 wrote:
> Just for the record, on MacOs 10.9.5, LO 4.3.5, Python 2.7.5, I don't
> reproduce the segfault but have an error:
> $ export PYTHONPATH=/Applications/LibreOffice.app/Contents/MacOS
> i$ python
> Python 2.7.5 (default, Mar  9 2014, 22:15:05) 
> [GCC 4.2.1 Compatible Apple LLVM 5.0 (clang-500.0.68)] on darwin
> Type "help", "copyright", "credits" or "license" for more information.
>>>> import uno
> Traceback (most recent call last):
>   File "<stdin>", line 1, in <module>
>   File "/Applications/LibreOffice.app/Contents/MacOS/uno.py", line 21, in
> <module>
>     import pyuno
> ImportError: dynamic module does not define init function (initpyuno)
>>>>
> 
> But after having installed Python3 (3.4.1) with brew, I could reproduce
> this:
> $ python3
> Python 3.4.1 (default, May 19 2014, 13:10:29) 
> [GCC 4.2.1 Compatible Apple LLVM 5.1 (clang-503.0.40)] on darwin
> Type "help", "copyright", "credits" or "license" for more information.
>>>> import uno
> Segmentation fault: 11

this is not at all surprising: the LO pyuno library is built against the
bundled CPython and will not work with any other version that may be
installed on the system because it will most likely not have the same C ABI.




More information about the LibreOffice mailing list