ImageMagick魔杖没有识别pdf图像?

Bar*_*Bar 8 python imagemagick python-3.x wand

我正在尝试使用博客文章将一个pdf转换为jpg,但是每当我尝试运行这个简单的脚本时,我都会遇到此异常wand.exceptions.WandError: wand contains no images MagickWand-56' @ error/magick-image.c/MagickWriteImage/13001

from wand.image import Image

with Image(filename="myFile.pdf") as img:
    img.save(filename="myFile.png")
Run Code Online (Sandbox Code Playgroud)

我正在使用最新版本的Wand和Python 3.4.2.我唯一能想到的可能是版本兼容性问题.

Mar*_*cin 8

所以只是为了解决这个问题,问题就是缺少mac上的ghostscript库,如上面的评论中所示:

"也许有些库缺失了.你使用linux/windows/mac吗?检查pdfs需要什么?ghostscript也许?"