使用枕头时如何解决Ghostscript操作系统错误?

问题描述 投票:0回答:1

这是我得到的错误:

OS Error: Ghostscript not found on paths

运行以下功能时:

from PIL import Image
def convert_ps_to_png(ps_file):
    img = Image.open(ps_file)  
    img = Image.save("file.png")# Error occurs on this line

convert_ps_to_png(ps_file_path)

任何解决方案将不胜感激。最终目标是通过脚本将.ps文件转换为.png文件。

python python-imaging-library ghostscript
1个回答
0
投票
根据您先前问题的答案,您需要安装Ghostscript,并在系统环境变量$ PATH中可用。
© www.soinside.com 2019 - 2024. All rights reserved.