我刚刚买了一台新笔记本电脑,想在新的 Windows 64x
(Python3.7.0)
机器上设置 MoviePY
。我对所有内容进行了三次检查,但是当涉及到我的代码的文本部分时,它向我抛出了该错误;
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
已正确安装。当我在cmd
中输入convert时,它会打印“ImageMagick 7.0.8 Q16 x64”
和一堆其他内容。
我在这里缺少什么?
最佳答案
我遇到了与您相同的错误,但我的问题是我没有正确安装 ImageMagick :在安装向导中,您需要选中“安装旧版实用程序”。
所以我重新安装了它,选中了此框,它起作用了。
关于python - MoviePY 无法在 Windows 上检测 ImageMagick 二进制文件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51928807/