不乱于心,不困于情。
不畏将来,不念过往。如此,安好。

python安装ImageMagick

一、moviepy安装步骤

1、pip install moviepy

2、pip install requests

此时运行moviepy视频剪辑代码,会遇到以下错误:

.This error can be due to the fact that 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。

这是因为ImageMagick没有安装

3、安装ImageMagick软件:

(1)、下载对应版本的软件:https://www.imagemagick.org/script/index.php

(2)、安装好,修改moviepy包(\Lib\site-packages\moviepy\)中的config_defaults.py文件,修改之后如下:

import os

FFMPEG_BINARY = os.getenv('FFMPEG_BINARY', 'ffmpeg-imageio')
# IMAGEMAGICK_BINARY = os.getenv('IMAGEMAGICK_BINARY', 'auto-detect') # 这是注释掉原来的
IMAGEMAGICK_BINARY = r"D:\ImageMagick-7.0.8-Q16\magick.exe" # 这是要添加ImageMagic的安装路径

赞(0) 打赏
未经允许不得转载:seo优化_前端开发_渗透技术 » python安装ImageMagick

觉得文章有用就打赏一下文章作者

支付宝扫一扫打赏

微信扫一扫打赏