因此,我试图在Docker容器中使用python运行libreoffice,在本地,代码可以工作,但是在Docker中,它不能工作。我认为它使用Centos 7。
Dockerfile:
FROM python:3.7.7-buster
...
RUN apt-get update && apt-get install -y libreoffice
...Python代码:
s = 'libreoffice --headless --convert-to csv ' + filename
subprocess.call(s, shell=True)
...日志:
...
/bin/sh: 1: libreoffice: not found发布于 2022-06-25 22:30:56
@DavidMaze,我解决了这个问题,只需设置final,以便从前面的数据中获取数据。谢谢
https://stackoverflow.com/questions/72752892
复制相似问题