RuntimeError:imageio.ffmpeg.download() 已被弃用。请改用“pip install im ageio-ffmpeg”。

RuntimeError:imageio.ffmpeg.download() 已被弃用。请改用“pip install im ageio-ffmpeg”。

尝试导入 moviepy.editor 时出现此错误。

    >>> import moviepy.editor
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "C:\Users\admin\Anaconda3\envs\myOpenCVEnv\lib\site-packages\moviepy\edit
or.py", line 26, in <module>
    imageio.plugins.ffmpeg.download()
  File "C:\Users\admin\Anaconda3\envs\myOpenCVEnv\lib\site-packages\imageio\plug
ins\ffmpeg.py", line 40, in download
    "imageio.ffmpeg.download() has been deprecated. "
RuntimeError: imageio.ffmpeg.download() has been deprecated. Use 'pip install im
ageio-ffmpeg' instead.'
>>> import imageio
>>> imageio.plugins.ffmpeg.download()
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "C:\Users\admin\Anaconda3\envs\myOpenCVEnv\lib\site-packages\imageio\plug
ins\ffmpeg.py", line 40, in download
    "imageio.ffmpeg.download() has been deprecated. "
RuntimeError: imageio.ffmpeg.download() has been deprecated. Use 'pip install im
ageio-ffmpeg' instead.'

我使用的是 Windows 7 64 位。我正在使用 conda 环境。conda 版本:4.6.1。python 版本:3.5.3

答案1

这是由于更新imageio

改用这个:

sudo pip3 install imageio==2.4.1

相关内容