OSError:无法在路径上找到Ghostscript [英] OSError: Unable to locate Ghostscript on paths
问题描述
我试图用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 websites'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: 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.
我正在使用Python 3
I am working on Python 3
感谢帮助人员,
(哦,我是法语,所以也许我的英语不是很完美!)
(oh, and I'm French, so maybe my English is not really perfect !)
推荐答案
如果其他人遇到此问题:似乎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 Files \ gs \ gs9.22 \ bin \;
C:\Program Files\gs\gs9.22\bin\;
到变量的末尾.它应与前一个条目用分号隔开.
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的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!