我尝试用 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的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持html5模板网!
如何在 Python 中将货币字符串转换为浮点数?How do I convert a currency string to a floating point number in Python?(如何在 Python 中将货币字符串转换为浮点数?)
在 Pandas 中解析多索引 Excel 文件Parsing a Multi-Index Excel File in Pandas(在 Pandas 中解析多索引 Excel 文件)
pandas 时间序列 between_datetime 函数?pandas timeseries between_datetime function?( pandas 时间序列 between_datetime 函数?)
pandas 重新采样到每月的特定工作日pandas resample to specific weekday in month( pandas 重新采样到每月的特定工作日)
Python - 如何标准化时间序列数据Python - how to normalize time-series data(Python - 如何标准化时间序列数据)
statsmodels 使用 ARMA 模型进行预测statsmodels forecasting using ARMA model(statsmodels 使用 ARMA 模型进行预测)