Skip to content

Issue when installing PyAV on Linux #697

Closed
@Odianosen25

Description

@Odianosen25

Overview

Cannot install pyav on a Linux machine, but installed fine on Windows

Expected behavior

Installed on Linux

Actual behavior

It refuses to install neither on Alpine nor Ubuntu

Build report:

Running setup.py install for av ... error
    ERROR: Command errored out with exit status 1:
     command: /usr/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-tdmvuj_a/av/setup.py'"'"'; __file__='"'"'/tmp/pip-install-tdmvuj_a/av/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-epc_s7v9/install-record.txt --single-version-externally-managed --compile --install-headers /usr/include/python3.8/av
         cwd: /tmp/pip-install-tdmvuj_a/av/
    Complete output (48 lines):
    running install
    running build
    running build_py
    creating build
    creating build/lib.linux-x86_64-3.8
    creating build/lib.linux-x86_64-3.8/av
    copying av/__init__.py -> build/lib.linux-x86_64-3.8/av
    copying av/__main__.py -> build/lib.linux-x86_64-3.8/av
    copying av/deprecation.py -> build/lib.linux-x86_64-3.8/av
    copying av/datasets.py -> build/lib.linux-x86_64-3.8/av
    creating build/lib.linux-x86_64-3.8/av/data
    copying av/data/__init__.py -> build/lib.linux-x86_64-3.8/av/data
    creating build/lib.linux-x86_64-3.8/av/container
    copying av/container/__init__.py -> build/lib.linux-x86_64-3.8/av/container
    creating build/lib.linux-x86_64-3.8/av/video
    copying av/video/__init__.py -> build/lib.linux-x86_64-3.8/av/video
    creating build/lib.linux-x86_64-3.8/av/subtitles
    copying av/subtitles/__init__.py -> build/lib.linux-x86_64-3.8/av/subtitles
    creating build/lib.linux-x86_64-3.8/av/audio
    copying av/audio/__init__.py -> build/lib.linux-x86_64-3.8/av/audio
    creating build/lib.linux-x86_64-3.8/av/codec
    copying av/codec/__init__.py -> build/lib.linux-x86_64-3.8/av/codec
    creating build/lib.linux-x86_64-3.8/av/sidedata
    copying av/sidedata/__init__.py -> build/lib.linux-x86_64-3.8/av/sidedata
    creating build/lib.linux-x86_64-3.8/av/filter
    copying av/filter/__init__.py -> build/lib.linux-x86_64-3.8/av/filter
    running build_ext
    running config
    PyAV: 8.0.2 (unknown commit)
    Python: 3.8.5 (default, Jul 20 2020, 23:08:58) \n[GCC 9.3.0]
    platform: Linux-4.15.0-112-generic-x86_64-with
    extension_extra:
        include_dirs: [b'include']
        libraries: []
        library_dirs: []
        define_macros: []
        runtime_library_dirs: []
    config_macros:
        PYAV_COMMIT_STR="unknown-commit"
        PYAV_VERSION=8.0.2
        PYAV_VERSION_STR="8.0.2"
    Could not find libavformat with pkg-config.
    Could not find libavcodec with pkg-config.
    Could not find libavdevice with pkg-config.
    Could not find libavutil with pkg-config.
    Could not find libavfilter with pkg-config.
    Could not find libswscale with pkg-config.
    Could not find libswresample with pkg-config.
    ----------------------------------------
ERROR: Command errored out with exit status 1: /usr/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-tdmvuj_a/av/setup.py'"'"'; __file__='"'"'/tmp/pip-install-tdmvuj_a/av/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-epc_s7v9/install-record.txt --single-version-externally-managed --compile --install-headers /usr/include/python3.8/av Check the logs for full command output.

Investigation

Well I did have FFmpeg installed already, and even using the --no-binary, was still same

Reproduction

pip3 install av on Alpine Linux

Versions

  • OS: Alpine 3.9
  • PyAV runtime: 8.0.0
- FFmpeg:

ffmpeg version 4.1.6 Copyright (c) 2000-2020 the FFmpeg developers
built with gcc 8.3.0 (Alpine 8.3.0)
configuration: --prefix=/usr --enable-avresample --enable-avfilter --enable-gnutls --enable-gpl --enable-libass --enable-libmp3lame --enable-libvorbis --enable-libvpx --enable-libxvid --enable-libx264 --enable-libx265 --enable-libtheora --enable-libv4l2 --enable-postproc --enable-pic --enable-pthreads --enable-shared --enable-libxcb --disable-stripping --disable-static --disable-librtmp --enable-vaapi --enable-vdpau --enable-libopus --disable-debug
libavutil 56. 22.100 / 56. 22.100
libavcodec 58. 35.100 / 58. 35.100
libavformat 58. 20.100 / 58. 20.100
libavdevice 58. 5.100 / 58. 5.100
libavfilter 7. 40.101 / 7. 40.101
libavresample 4. 0. 0 / 4. 0. 0
libswscale 5. 3.100 / 5. 3.100
libswresample 3. 3.100 / 3. 3.100
libpostproc 55. 3.100 / 55. 3.100



## Research

I have done the following:

- [x] Checked the [PyAV documentation](https://pyav.org/docs)
- [x] Searched on [Google](https://www.google.com/search?q=pyav+how+do+I+foo)
- [x] Searched on [Stack Overflow](https://stackoverflow.com/search?q=pyav)
- [x] Looked through [old GitHub issues](https://github.com/PyAV-Org/PyAV/issues?&q=is%3Aissue)
- [x] Asked on [PyAV Gitter](https://gitter.im/PyAV-Org)
- [ ] ... and waited 72 hours for a response.


## Additional context

I am  trying to use aiortc for a project within an Alpine Linux docker container, and this is the only aspect wanting

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions