代码之家  ›  专栏  ›  技术社区  ›  cem akbulut

MoviePY无法在Windows上检测ImageMagick二进制文件

  •  0
  • cem akbulut  · 技术社区  · 6 年前

    我刚给自己买了一台新的笔记本,想安装 MoviePY 关于那个新的 Windows 64x (Python3.7.0) 机器。我对所有内容都进行了三次检查,但当涉及到代码的文本部分时,它会将错误抛给我;

    OSError: MoviePy Error: creation of None failed because of the following error:
    
    OSError: [WinError 6] The handle is invalid
    
    "ImageMagick is not installed on your computer, or (for Windows users) that you didn't specify the path to the ImageMagick binary in file conf.py, or that the path you specified is incorrect"
    

    config_defaults.py 文件;

    import os
    FFMPEG_BINARY = os.getenv('FFMPEG_BINARY', 'ffmpeg-imageio')
    #IMAGEMAGICK_BINARY = os.getenv('IMAGEMAGICK_BINARY', 'auto-detect')
    IMAGEMAGICK_BINARY = "C:\\Program Files\\ImageMagick-7.0.8-Q16\\magick.exe"
    

    路径是正确的 magick.exe convert.exe 存在于那条道路上。我也确定 ImageMagick 安装正确。当我键入convert in时 cmd ,它打印 "ImageMagick 7.0.8 Q16 x64" 还有很多其他的东西。

    我错过了什么?

    1 回复  |  直到 6 年前
        1
  •  3
  •   Jan Černý    6 年前

    从最上面的一行接受评论,而不是 auto-detect 把路和名字放在一起 convert

    IMAGEMAGICK_BINARY = os.getenv ('IMAGEMAGICK_BINARY', 'C:\Program Files\ImageMagick-7.0.8-Q16\convert.exe')