Pyinstaller and moviepy, ffmpeg works from the terminal, but not from finder

I am writing python using pyinstaller 2.1 on OSX Mavericks. I have done this successfully in the past, but this is my first package that uses coppy and ffmpeg. I use the following import:

from moviepy.video.io import ffmpeg_reader

Without this line in the code, everything works fine, and I can run my last package from its icon in finder. When importing film strip, it will work if I start from the terminal as follows:

open ./myapp.app

but it will not open if I click on the icon from finder (it opens quickly and crashes). I assume this has something to do with paths or environment variables that are set in the terminal but not wrap into my packaged application. I tried various hidden imports in pyinstaller for video games and its dependencies, but nothing works. --debug mode did not provide much information to track it. Any other ideas?

Thank!

+4
source share
1 answer

There are several problems with the pypypy and pyinstaller software.

First try to write the error to a text file

try:
    from moviepy.video.io import ffmpeg_reader
except Exception as e:
    with open('/absolute/path/to/error.txt',mode="w+") as f:
        f.write(str(e))

1) You may need to modify these two files to remove the "exec" import statements

moviepy//FX//__ init__.py, moviepy//FX//__ __ INIT.

. : https://github.com/pratikone/videoVenom/blob/master/moviepy/audio/fx/all/__init__.py https://github.com/pratikone/videoVenom/blob/master/moviepy/video/fx/all/__init__.py

2) , imageio.plugins.ffmpeg.download(), ffmpeg , .

+1

All Articles