OSError: Unable to locate Ghostscript on paths(OSError:无法在路径上找到 Ghostscript)
问题描述
我尝试用 Pyzo 打开 EPS 图像,我已经安装了 PIL 和 Ghostscript(因为我看到在其他一些网站主题上是必需的),我的代码是:
I tried to open an EPS image with Pyzo, I have installed PIL and Ghostscript (as I saw that it is necessary on some other website topics), my code is:
from PIL import Image
im = Image.open('''myimage.eps''')
im.show()
但是当我运行代码时,Pyzo 会返回:
but when I run the code, Pyzo return me:
OSError: 无法在路径上找到 Ghostscript
OSError: Unable to locate Ghostscript on paths
我尝试在几个网站上查看它,但对于新手编码学生来说似乎相当复杂.
I tried to look into it on several websites but it seems pretty complicated for a novice coding student.
推荐答案
万一其他人遇到这个问题: 似乎Ghostscript没有正确添加到路径中.对于那些运行 Win7 的人,这里有一个修复:
In case someone else encounters this issue: It seems that Ghostscript has not been added to the paths properly. For those running Win7, here is a fix:
转到:控制面板 -> 系统 -> 高级系统设置 -> 环境变量...
Go to: Control Panel -> System -> Advanced system settings -> Environment Variables...
找到变量PATH" -> 编辑... -> 将路径添加到您的 ghostscript 二进制文件夹,例如
Find the variable "PATH" -> Edit... -> add the path to your ghostscript binary folder, e.g.
C:Program Filesgsgs9.22in;
C:Program Filesgsgs9.22in;
到变量的末尾.它应该用分号与上一个条目分隔.
to the end of the variable. It should be separated from the previous entry by a semicolon.
我必须重新启动才能使更改生效.
I had to restart for the changes to take effect.
这篇关于OSError:无法在路径上找到 Ghostscript的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:OSError:无法在路径上找到 Ghostscript
- 如何在 python3 中将 OrderedDict 转换为常规字典 2022-01-01
- python check_output 失败,退出状态为 1,但 Popen 适用于相同的命令 2022-01-01
- 沿轴计算直方图 2022-01-01
- 分析异常:路径不存在:dbfs:/databricks/python/lib/python3.7/site-packages/sampleFolder/data; 2022-01-01
- python-m http.server 443--使用SSL? 2022-01-01
- 如何在 Python 的元组列表中对每个元组中的第一个值求和? 2022-01-01
- 如何将一个类的函数分成多个文件? 2022-01-01
- 使用Heroku上托管的Selenium登录Instagram时,找不到元素';用户名'; 2022-01-01
- padding='same' 转换为 PyTorch padding=# 2022-01-01
- pytorch 中的自适应池是如何工作的? 2022-07-12
