Has anyone found a solution for this error?
I’m having this error after Python migration from 3.9 → 3.10
I first upgraded FFmpeg to 5.1 but that didn’t fix it. (after that I reverted to 4.2).
I tried also building a previous ha-av version (9.2) and that worked, but HA requires version 10.0.0
This is a part of my log:
2023-01-20 11:09:27.306 ERROR (SyncWorker_9) [homeassistant.util.package] Unable to install package ha-av==10.0.0: error: subprocess-exited-with-error
× Building wheel for ha-av (pyproject.toml) did not run successfully.
│ exit code: 1
╰─> [5063 lines of output]
running bdist_wheel
running build
running build_py
creating build
creating build/lib.linux-armv7l-cpython-310
creating build/lib.linux-armv7l-cpython-310/av
copying av/deprecation.py → build/lib.linux-armv7l-cpython-310/av
copying av/datasets.py → build/lib.linux-armv7l-cpython-310/av
copying av/about.py → build/lib.linux-armv7l-cpython-310/av
copying av/main.py → build/lib.linux-armv7l-cpython-310/av
copying av/init.py → build/lib.linux-armv7l-cpython-310/av
creating build/lib.linux-armv7l-cpython-310/av/video
copying av/video/init.py → build/lib.linux-armv7l-cpython-310/av/video
creating build/lib.linux-armv7l-cpython-310/av/subtitles
copying av/subtitles/init.py → build/lib.linux-armv7l-cpython-310/av/subtitles
creating build/lib.linux-armv7l-cpython-310/av/sidedata
copying av/sidedata/init.py → build/lib.linux-armv7l-cpython-310/av/sidedata
creating build/lib.linux-armv7l-cpython-310/av/filter
copying av/filter/init.py → build/lib.linux-armv7l-cpython-310/av/filter
creating build/lib.linux-armv7l-cpython-310/av/data
copying av/data/init.py → build/lib.linux-armv7l-cpython-310/av/data
creating build/lib.linux-armv7l-cpython-310/av/container
copying av/container/init.py → build/lib.linux-armv7l-cpython-310/av/container
creating build/lib.linux-armv7l-cpython-310/av/codec
copying av/codec/init.py → build/lib.linux-armv7l-cpython-310/av/codec
creating build/lib.linux-armv7l-cpython-310/av/bitstream
copying av/bitstream/init.py → build/lib.linux-armv7l-cpython-310/av/bitstream
creating build/lib.linux-armv7l-cpython-310/av/audio
copying av/audio/init.py → build/lib.linux-armv7l-cpython-310/av/audio
copying av/utils.pxd → build/lib.linux-armv7l-cpython-310/av
copying av/stream.pxd → build/lib.linux-armv7l-cpython-310/av
copying av/plane.pxd → build/lib.linux-armv7l-cpython-310/av
copying av/packet.pxd → build/lib.linux-armv7l-cpython-310/av
copying av/option.pxd → build/lib.linux-armv7l-cpython-310/av
copying av/logging.pxd → build/lib.linux-armv7l-cpython-310/av
copying av/frame.pxd → build/lib.linux-armv7l-cpython-310/av
copying av/format.pxd → build/lib.linux-armv7l-cpython-310/av
copying av/error.pxd → build/lib.linux-armv7l-cpython-310/av
copying av/enum.pxd → build/lib.linux-armv7l-cpython-310/av
copying av/dictionary.pxd → build/lib.linux-armv7l-cpython-310/av
copying av/descriptor.pxd → build/lib.linux-armv7l-cpython-310/av
copying av/bytesource.pxd → build/lib.linux-armv7l-cpython-310/av
copying av/buffer.pxd → build/lib.linux-armv7l-cpython-310/av
copying av/init.pxd → build/lib.linux-armv7l-cpython-310/av
copying av/video/stream.pxd → build/lib.linux-armv7l-cpython-310/av/video
copying av/video/reformatter.pxd → build/lib.linux-armv7l-cpython-310/av/video
copying av/video/plane.pxd → build/lib.linux-armv7l-cpython-310/av/video
copying av/video/frame.pxd → build/lib.linux-armv7l-cpython-310/av/video
copying av/video/format.pxd → build/lib.linux-armv7l-cpython-310/av/video
copying av/video/codeccontext.pxd → build/lib.linux-armv7l-cpython-310/av/video
copying av/video/init.pxd → build/lib.linux-armv7l-cpython-310/av/video
copying av/subtitles/subtitle.pxd → build/lib.linux-armv7l-cpython-310/av/subtitles
copying av/subtitles/stream.pxd → build/lib.linux-armv7l-cpython-310/av/subtitles
copying av/subtitles/codeccontext.pxd → build/lib.linux-armv7l-cpython-310/av/subtitles
copying av/subtitles/init.pxd → build/lib.linux-armv7l-cpython-310/av/subtitles
copying av/sidedata/sidedata.pxd → build/lib.linux-armv7l-cpython-310/av/sidedata
copying av/sidedata/motionvectors.pxd → build/lib.linux-armv7l-cpython-310/av/sidedata
copying av/sidedata/init.pxd → build/lib.linux-armv7l-cpython-310/av/sidedata
copying av/filter/pad.pxd → build/lib.linux-armv7l-cpython-310/av/filter
copying av/filter/link.pxd → build/lib.linux-armv7l-cpython-310/av/filter
copying av/filter/graph.pxd → build/lib.linux-armv7l-cpython-310/av/filter
copying av/filter/filter.pxd → build/lib.linux-armv7l-cpython-310/av/filter
copying av/filter/context.pxd → build/lib.linux-armv7l-cpython-310/av/filter
copying av/filter/init.pxd → build/lib.linux-armv7l-cpython-310/av/filter
copying av/data/stream.pxd → build/lib.linux-armv7l-cpython-310/av/data
copying av/data/init.pxd → build/lib.linux-armv7l-cpython-310/av/data
copying av/container/streams.pxd → build/lib.linux-armv7l-cpython-310/av/container
copying av/container/pyio.pxd → build/lib.linux-armv7l-cpython-310/av/container
copying av/container/output.pxd → build/lib.linux-armv7l-cpython-310/av/container
copying av/container/input.pxd → build/lib.linux-armv7l-cpython-310/av/container
copying av/container/core.pxd → build/lib.linux-armv7l-cpython-310/av/container
copying av/container/init.pxd → build/lib.linux-armv7l-cpython-310/av/container
copying av/codec/context.pxd → build/lib.linux-armv7l-cpython-310/av/codec
copying av/codec/codec.pxd → build/lib.linux-armv7l-cpython-310/av/codec
copying av/codec/init.pxd → build/lib.linux-armv7l-cpython-310/av/codec
copying av/bitstream/filter.pxd → build/lib.linux-armv7l-cpython-310/av/bitstream
copying av/bitstream/context.pxd → build/lib.linux-armv7l-cpython-310/av/bitstream
copying av/audio/stream.pxd → build/lib.linux-armv7l-cpython-310/av/audio
copying av/audio/resampler.pxd → build/lib.linux-armv7l-cpython-310/av/audio
copying av/audio/plane.pxd → build/lib.linux-armv7l-cpython-310/av/audio
copying av/audio/layout.pxd → build/lib.linux-armv7l-cpython-310/av/audio
copying av/audio/frame.pxd → build/lib.linux-armv7l-cpython-310/av/audio
copying av/audio/format.pxd → build/lib.linux-armv7l-cpython-310/av/audio
copying av/audio/fifo.pxd → build/lib.linux-armv7l-cpython-310/av/audio
copying av/audio/codeccontext.pxd → build/lib.linux-armv7l-cpython-310/av/audio
copying av/audio/init.pxd → build/lib.linux-armv7l-cpython-310/av/audio
running build_ext
building ‘av.utils’ extension
creating build/temp.linux-armv7l-cpython-310
creating build/temp.linux-armv7l-cpython-310/src
creating build/temp.linux-armv7l-cpython-310/src/av
gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -I/usr/local/include -I/home/homeassistant/.pyenv/versions/3.10.9/include/python3.10 -c src/av/utils.c -o build/temp.linux-armv7l-cpython-310/src/av/utils.o
In file included from /usr/include/arm-linux-gnueabihf/libavcodec/bsf.h:28,
from src/av/utils.c:820:
/usr/include/arm-linux-gnueabihf/libavcodec/codec_id.h:46:6: error: redeclaration of ‘enum AVCodecID’
46 | enum AVCodecID {
| ^~~~~~~~~
In file included from src/av/utils.c:811:
/usr/local/include/libavcodec/avcodec.h:215:6: note: originally defined here
215 | enum AVCodecID {
| ^~~~~~~~~
In file included from /usr/include/arm-linux-gnueabihf/libavcodec/bsf.h:28,
from src/av/utils.c:820:
/usr/include/arm-linux-gnueabihf/libavcodec/codec_id.h:47:5: error: redeclaration of enumerator ‘AV_CODEC_ID_NONE’
47 | AV_CODEC_ID_NONE,
| ^~~~~~~~~~~~~~~~
In file included from src/av/utils.c:811:
/usr/local/include/libavcodec/avcodec.h:216:5: note: previous definition of ‘AV_CODEC_ID_NONE’ was here
216 | AV_CODEC_ID_NONE,
| ^~~~~~~~~~~~~~~~
In file included from /usr/include/arm-linux-gnueabihf/libavcodec/bsf.h:28,
from src/av/utils.c:820:
/usr/include/arm-linux-gnueabihf/libavcodec/codec_id.h:50:5: error: redeclaration of enumerator ‘AV_CODEC_ID_MPEG1VIDEO’
50 | AV_CODEC_ID_MPEG1VIDEO,
| ^~~~~~~~~~~~~~~~~~~~~~
In file included from src/av/utils.c:811:
/usr/local/include/libavcodec/avcodec.h:219:5: note: previous definition of ‘AV_CODEC_ID_MPEG1VIDEO’ was here
219 | AV_CODEC_ID_MPEG1VIDEO,
| ^~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/arm-linux-gnueabihf/libavcodec/bsf.h:28,
from src/av/utils.c:820:
/usr/include/arm-linux-gnueabihf/libavcodec/codec_id.h:51:5: error: redeclaration of enumerator ‘AV_CODEC_ID_MPEG2VIDEO’
51 | AV_CODEC_ID_MPEG2VIDEO, ///< preferred ID for MPEG-1/2 video decoding
| ^~~~~~~~~~~~~~~~~~~~~~
In file included from src/av/utils.c:811:
/usr/local/include/libavcodec/avcodec.h:220:5: note: previous definition of ‘AV_CODEC_ID_MPEG2VIDEO’ was here
220 | AV_CODEC_ID_MPEG2VIDEO, ///< preferred ID for MPEG-1/2 video decoding
| ^~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/arm-linux-gnueabihf/libavcodec/bsf.h:28,
from src/av/utils.c:820:
/usr/include/arm-linux-gnueabihf/libavcodec/codec_id.h:52:5: error: redeclaration of enumerator ‘AV_CODEC_ID_H261’
52 | AV_CODEC_ID_H261,
| ^~~~~~~~~~~~~~~~
In file included from src/av/utils.c:811:
/usr/local/include/libavcodec/avcodec.h:221:5: note: previous definition of ‘AV_CODEC_ID_H261’ was here
221 | AV_CODEC_ID_H261,
| ^~~~~~~~~~~~~~~~
In file included from /usr/include/arm-linux-gnueabihf/libavcodec/bsf.h:28,
from src/av/utils.c:820:
/usr/include/arm-linux-gnueabihf/libavcodec/codec_id.h:53:5: error: redeclaration of enumerator ‘AV_CODEC_ID_H263’
53 | AV_CODEC_ID_H263,
| ^~~~~~~~~~~~~~~~
In file included from src/av/utils.c:811:
/usr/local/include/libavcodec/avcodec.h:222:5: note: previous definition of ‘AV_CODEC_ID_H263’ was here
222 | AV_CODEC_ID_H263,
| ^~~~~~~~~~~~~~~~
In file included from /usr/include/arm-linux-gnueabihf/libavcodec/bsf.h:28,
from src/av/utils.c:820:
/usr/include/arm-linux-gnueabihf/libavcodec/codec_id.h:54:5: error: redeclaration of enumerator ‘AV_CODEC_ID_RV10’
54 | AV_CODEC_ID_RV10,
| ^~~~~~~~~~~~~~~~
In file included from src/av/utils.c:811:
/usr/local/include/libavcodec/avcodec.h:223:5: note: previous definition of ‘AV_CODEC_ID_RV10’ was here
223 | AV_CODEC_ID_RV10,
| ^~~~~~~~~~~~~~~~
In file included from /usr/include/arm-linux-gnueabihf/libavcodec/bsf.h:28,
from src/av/utils.c:820:
/usr/include/arm-linux-gnueabihf/libavcodec/codec_id.h:55:5: error: redeclaration of enumerator ‘AV_CODEC_ID_RV20’
55 | AV_CODEC_ID_RV20,
| ^~~~~~~~~~~~~~~~
In file included from src/av/utils.c:811:
/usr/local/include/libavcodec/avcodec.h:224:5: note: previous definition of ‘AV_CODEC_ID_RV20’ was here
224 | AV_CODEC_ID_RV20,
| ^~~~~~~~~~~~~~~~
In file included from /usr/include/arm-linux-gnueabihf/libavcodec/bsf.h:28,
from src/av/utils.c:820:
/usr/include/arm-linux-gnueabihf/libavcodec/codec_id.h:56:5: error: redeclaration of enumerator ‘AV_CODEC_ID_MJPEG’
56 | AV_CODEC_ID_MJPEG,
| ^~~~~~~~~~~~~~~~~
In file included from src/av/utils.c:811:
/usr/local/include/libavcodec/avcodec.h:225:5: note: previous definition of ‘AV_CODEC_ID_MJPEG’ was here
225 | AV_CODEC_ID_MJPEG,
| ^~~~~~~~~~~~~~~~~
In file included from /usr/include/arm-linux-gnueabihf/libavcodec/bsf.h:28,
from src/av/utils.c:820:
/usr/include/arm-linux-gnueabihf/libavcodec/codec_id.h:57:5: error: redeclaration of enumerator ‘AV_CODEC_ID_MJPEGB’
57 | AV_CODEC_ID_MJPEGB,
| ^~~~~~~~~~~~~~~~~~
In file included from src/av/utils.c:811:
/usr/local/include/libavcodec/avcodec.h:226:5: note: previous definition of ‘AV_CODEC_ID_MJPEGB’ was here
226 | AV_CODEC_ID_MJPEGB,
| ^~~~~~~~~~~~~~~~~~
In file included from /usr/include/arm-linux-gnueabihf/libavcodec/bsf.h:28,
from src/av/utils.c:820:
/usr/include/arm-linux-gnueabihf/libavcodec/codec_id.h:58:5: error: redeclaration of enumerator ‘AV_CODEC_ID_LJPEG’
58 | AV_CODEC_ID_LJPEG,
note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for ha-av
ERROR: Could not build wheels for ha-av, which is required to install pyproject.toml-based projects
2023-01-20 11:09:27.484 ERROR (MainThread) [homeassistant.setup] Setup failed for stream: Requirements for stream not found: [‘ha-av==10.0.0’].