imageio / imageio-ffmpeg

FFMPEG wrapper for Python
BSD 2-Clause "Simplified" License
225 stars 50 forks source link

tarball downloaded via pip install #12

Closed das7pad closed 5 years ago

das7pad commented 5 years ago

I am not sure yet who to blame, but the wheel is not always downloaded via pip install imageio-ffmpeg.

This combination for example downloaded the tar ball instead.

Demo in docker for a 100% clean environment:

$ docker run --rm --tty python:3.7 bash -c "\
   pip install pip==18.1 wheel==0.33.0 \
&& pip install imageio-ffmpeg==0.2.0 \
&& find /usr/local/lib/python3.7/site-packages/imageio_ffmpeg/binaries/"
# <snip>
# /usr/local/lib/python3.7/site-packages/imageio_ffmpeg/binaries/
# /usr/local/lib/python3.7/site-packages/imageio_ffmpeg/binaries/README.md

Related issue: https://github.com/Zulko/moviepy/issues/906

almarklein commented 5 years ago

The binary wheels for Linux are for manylinux2010_x86_64. The manylinux2010 in essentially a specification for the Linux base libraries (e.g. glibc). It could be that the Docker image that you're using does not match these requirements. Or maybe its not x86_64?

The reason that the wheels are manylinux2010 and not the older manylinux1 is because of the glibc version that our current prebuild ffmpeg is build against.

My advice would be to add apt-get install ffmpeg (or similar) in the Docker recipe. Imageio-ffmpeg will also pick up the system ffmpeg.

das7pad commented 5 years ago

I am running docker on a x86_64 platform and so is the container i guess - uname reports it at least.

$ docker run --rm python:3.7 uname -a
# Linux 55917967f168 3.10.0-957.1.3.el7.x86_64 #1 SMP Thu Nov 29 14:49:43 UTC 2018 x86_64 GNU/Linux

I used docker to ensure a clean environment. Installing ffmpeg is not always an option, that's why we package it here. In the docker context it would be fine in most cases.

This is the same docker image, but we are installing the latest version of pip this time.

$ docker run --rm --tty python:3.7 bash -c "\
   pip install pip==19.0.2 wheel==0.33.0 \
&& pip install imageio-ffmpeg==0.2.0 \
&& find /usr/local/lib/python3.7/site-packages/imageio_ffmpeg/binaries/"
# <snip>
# /usr/local/lib/python3.7/site-packages/imageio_ffmpeg/binaries/
# /usr/local/lib/python3.7/site-packages/imageio_ffmpeg/binaries/ffmpeg-linux64-v4.1
# /usr/local/lib/python3.7/site-packages/imageio_ffmpeg/binaries/README.md

So there is a compatibility issue with this package and pip<19.

almarklein commented 5 years ago

Oh, thanks for looking into this. It could simply be that pip<19 is unaware of manylinux2010.

almarklein commented 5 years ago

I added a note to the readme.

jayvdb commented 5 years ago

You could add setup_requires=['pip>19']