如果我在终端中运行 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
请帮我解决这个问题
最佳答案
是的,这会引发错误,而且已经有很多关闭的issues在 GitHub 上与该问题相关。
最有用的答案是49#issuecomment-416317222和 49#issuecomment-464011493 。很难相信这个问题从 2012 年就已经出现了,而且仍然没有得到适当的解决。
关于python - 如何在 django python 中通过子进程运行 unoconv?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/59463140/