【发布时间】:2019-04-15 11:50:00
【问题描述】:
我在 PyCharm 内的 64 位 Windows 10 上的 venv 中运行 Python 3.6。以下是我执行的步骤:
- 打开 PyCharm 并使用 Python 3.6 作为 venv 开始一个新项目。
- 从以下来源下载 Python3.6 的 Wheel 文件中的 PythonMagick:PythonMagick wheel file
在 PyCharm 中打开终端并运行:
pip install PythonMagick-0.9.19-cp36-cp36m-win_amd64.whl从这里下载 ghostscript:Ghostscript 9.25 for Windows (64 bit) 并运行 exe 文件。
将 ghostscript 目录
C:\Program Files\gs\gs9.25\bin添加到用户 PATH 环境变量中。
现在我从这里运行示例文件
import PythonMagick
if __name__ == "__main__":
pdf = 'a.pdf'
p = PythonMagick.Image()
p.read(pdf)
p.write('doc.jpg')
我收到以下错误:
RuntimeError: Magick: UnableToOpenConfigureFile `delegates.xml' @ 警告/configure.c/GetConfigureOptions/714
如何解决这个错误?
【问题讨论】:
标签: windows-10 runtime-error 64-bit python-3.6 pythonmagick