Closed mayank10j closed 3 years ago
Thanks for the report @mayank10j !
This surprises me a bit. The permissions are set during the packaging process, and as far as I can tell, the permissions are maintained by wheels. I just confirmed on Linux that I can do pip install imageio-ffmpeg
and then run get_ffmpeg_exe()
just fine.
Could there be something different in your env that causes this approach to break? Perhaps pip-installing in a conda env?
It is possible to set permissions in setup.py
, but that will only work when installing from sdist ...
There are two differences with usual pip based environment on Linux system i can think of:
I can replicate this issue by building a docker container using above Dockerfile and running get_ffmpeg_exe() which fails.
Odd
almar@almar-VirtualBox:~/dev/test$ docker run -it ffmpeg1
(base) root@8b72e3ce1e55:/# python3
Python 3.8.5 (default, Sep 4 2020, 07:30:14)
[GCC 7.3.0] :: Anaconda, Inc. on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import imageio_ffmpeg
>>> imageio_ffmpeg.get_ffmpeg_exe()
'/opt/conda/lib/python3.8/site-packages/imageio_ffmpeg/binaries/ffmpeg-linux64-v4.2.2'
>>> imageio_ffmpeg.get_ffmpeg_version()
'4.2.2-static'
fixed the issue in the environment
For future reference, could you please explain how you fixed it or what the cause of the error was?
On inspecting ffmpeg executable installed after installing imageio-ffmpeg package is not readable and executable which is causing following runtime error: RuntimeError: No ffmpeg exe could be found. Install ffmpeg on your system, or set the IMAGEIO_FFMPEG_EXE environment variable.
Enclosing Dockerfile for replicating issue in linux:
Now calling def get_ffmpeg_exe() method after importing imageio_ffmpeg causes this runtime issue. Additionally I can see ffmpeg binary ffmpeg-linux64-v4.2.2 in site-packages /opt/conda/lib/python3.8/site-packages/imageio_ffmpeg-0.4.3-py3.8-linux-x86_64.egg/imageio_ffmpeg/binaries. Manually setting permission using chmod +x ffmpeg-linux64-v4.2.2 fixes issue. This should be automatically handled by code while installing.