cem*_*lut 6 python imagemagick moviepy
我刚给自己买了一台新笔记本电脑,想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"
Run Code Online (Sandbox Code Playgroud)
我的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"
Run Code Online (Sandbox Code Playgroud)
路径是正确的,都magick.exe和convert.exe该路径存在。我也确定ImageMagick安装正确。当我输入 convert in 时cmd,它会打印"ImageMagick 7.0.8 Q16 x64"和一堆其他东西。
我在这里缺少什么?
我遇到了同样的问题,并且由于此评论而得到解决。
from moviepy.config import change_settings
change_settings({"IMAGEMAGICK_BINARY": r"C:\\Program Files\\ImageMagick-7.0.8-Q16\\magick.exe"})
Run Code Online (Sandbox Code Playgroud)
这为我解决了问题。
小智 5
从顶行获取注释,而不是auto-detect放置路径并放置名称convert。
IMAGEMAGICK_BINARY = os.getenv ('IMAGEMAGICK_BINARY', 'C:\Program Files\ImageMagick-7.0.8-Q16\convert.exe')
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
3135 次 |
| 最近记录: |