使用check_call将dot转换为png,没有这样的文件或权限被拒绝

2024-09-24 22:22:49 发布

您现在位置:Python中文网/ 问答频道 /正文

我在用

check_call(['dot', '-Tpng', 'tree.dot', '-o', 'tree.png'])

但我有

FileNotFoundError: [Errno 2] No such file or directory: 'dot'

当我指定替换'dot'的路径时

PermissionError: [Errno 13] Permission denied

我用导入操作系统检查我当前的工作目录,它是正确的。 为什么还说没有这样的文件?在


Tags: orno路径treepngcheckcalldot