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


基础教程推荐
- Kivy 使用 opencv.调整图像大小 2022-01-01
- kivy 应用程序中的一个简单网页作为小部件 2022-01-01
- 对多索引数据帧的列进行排序 2022-01-01
- 在 Python 中将货币解析为数字 2022-01-01
- matplotlib 设置 yaxis 标签大小 2022-01-01
- 在 Django Admin 中使用内联 OneToOneField 2022-01-01
- 比较两个文本文件以找出差异并将它们输出到新的文本文件 2022-01-01
- Python,确定字符串是否应转换为 Int 或 Float 2022-01-01
- Python 中是否有任何支持将长字符串转储为块文字或折叠块的 yaml 库? 2022-01-01
- 究竟什么是“容器"?在蟒蛇?(以及所有的 python 容器类型是什么?) 2022-01-01