If I run unoconv -f pdf test_pdf.docx in terminal, it's working fine. But if I run it in subprocess, I got this error
subprocess.run(['unoconv', '-f', 'pdf', path], shell=True)
unoconv: Cannot find a suitable pyuno library and python binary combination in
/usr/lib/libreoffice
ERROR: No module named 'uno'
unoconv: Cannot find a suitable office installation on your system.
ERROR: Please locate your office installation and send your feedback to:
http://github.com/dagwieers/unoconv/issues
Please help me resolve this problem
Yes, this throws the error, also there are already a lot of closed issues on GitHub related to the issue.
The most useful answers are 49#issuecomment-416317222 and 49#issuecomment-464011493. It is hard to believe but the problem came from 2012 and still does not has a proper fix.