Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can't import moviepy.editor

i was trying to create an application with python using the moviepy library. I installed it using:

pip install moviepy

I found this from a MoviePy crash-course:

# Import everything needed to edit video clips
from moviepy.editor import *

After trying to run this line i get this error:

Python 2.7.13 (v2.7.13:a06454b1afa1, Dec 17 2016, 20:42:59) [MSC v.1500 32     bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> # Import everything needed to edit video clips
... from moviepy.editor import *
Traceback (most recent call last):
  File "<stdin>", line 2, in <module>
  File "C:\Python27\lib\site-packages\moviepy\editor.py", line 22, in <module>
    from .video.io.VideoFileClip import VideoFileClip
  File "C:\Python27\lib\site-packages\moviepy\video\io\VideoFileClip.py", line 3, in <module>
    from moviepy.video.VideoClip import VideoClip
  File "C:\Python27\lib\site-packages\moviepy\video\VideoClip.py", line 20, in <module>
    from .io.ffmpeg_writer import ffmpeg_write_image, ffmpeg_write_video
  File "C:\Python27\lib\site-packages\moviepy\video\io\ffmpeg_writer.py", line 15, in <module>
    from moviepy.config import get_setting
  File "C:\Python27\lib\site-packages\moviepy\config.py", line 38, in <module>
    FFMPEG_BINARY = get_exe()
  File "C:\Python27\lib\site-packages\imageio\plugins\ffmpeg.py", line 86, in get_exe
    raise NeedDownloadError('Need ffmpeg exe. '
imageio.core.fetching.NeedDownloadError: Need ffmpeg exe. You can download it by calling:
  imageio.plugins.ffmpeg.download()

What is the problem here, and how can i fix it?

like image 882
Ingmar05 Avatar asked Jan 29 '17 16:01

Ingmar05


People also ask

How do I import MoviePy into Python?

Installation. MoviePy depends on the Python modules Numpy, imageio, Decorator, and tqdm, which will be automatically installed during MoviePy's installation. The software FFMPEG should be automatically downloaded/installed (by imageio) during your first use of MoviePy (installation will take a few seconds).


1 Answers

I had a similar issue. It got fixed by the following line of code.

python -m pip install moviepy
like image 115
Ernest S Kirubakaran Avatar answered Sep 21 '22 22:09

Ernest S Kirubakaran