I want to use uno libraries to disable some of the menu options in Libreoffice document.
- Os Using: Linux
uname -a
Linux Tue Feb 4 23:02:59 UTC 2020 x86_64 x86_64 x
86_64 GNU/Linux Red Hat 4.8.5-39
- Python version : Python 3.6.8
- libreoffice version - LibreOffice 5.3.6.130(Build:1)
I am not able to do “import uno” or “import pyuno” in python 3. However both commands are working properly in Python2
Error I am getting in python 3:
>>> import pyuno
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: dynamic module does not define module export function (PyInit_pyuno)
>>> import uno
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ModuleNotFoundError: No module named 'uno'
Some of the more research which I have done
(/usr/lib64/libreoffice/program)-1037> objdump -t -T -r -R pyuno.so | grep initpyuno
0000000000000a90 g DF .text 0000000000000117 Base initpyuno
I think my libreoffice is built against Python 2.x . But I wasnt able to find any solution how to build it against python3.x
I have posted the same iisue in stackoverflow “python - Build LibreOffice Uno libraries for python3 - Stack Overflow”
Thanks in advance.