如果我在终端中运行unoconv -f pdf test_pdf.docx,则工作正常。但是,如果我在子进程中运行它,则会出现此错误
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
请帮助我解决此问题
最有用的答案是49#issuecomment-416317222和49#issuecomment-464011493。很难相信,但是问题出自2012年,仍然没有适当的解决方法。