更新时间:2022-11-30 16:57:21
我通过切换到进程目录(我尝试使用inkscape)解决了我遇到的类似问题,它解决了我的问题
I solved a similar problem I had by switching to the process directory (I was trying to use inkscape) and it solved my problem
import subprocess
inkscape_dir=r"C:Program Files (x86)Inkscape"
assert os.path.isdir(inkscape_dir)
os.chdir(inkscape_dir)
subprocess.Popen(['inkscape.exe',"-f",fname,"-e",fname_png])
也许切换到进程目录也对你有用.
Maybe switching to the process directory will work for you too.