Error during installation of ha-av

Hi all,

I am trying to make installation of ha-av working.
I am running with HA Core on Raspberry pi 3B v1.2 with os 11 (bullseye).
My version of HA is 2023.7.3.

When I run hass, I get the following error:

2023-08-25 18:27:45.330 ERROR (SyncWorker_7) [homeassistant.util.package] Unable to install package ha-av==10.1.0: error: subprocess-exited-with-error
  
  × Getting requirements to build wheel did not run successfully.
  │ exit code: 1
  ╰─> [80 lines of output]
      Compiling av/_core.pyx because it changed.
      [1/1] Cythonizing av/_core.pyx
      Compiling av/error.pyx because it changed.
      [1/1] Cythonizing av/error.pyx
      Compiling av/plane.pyx because it changed.
      [1/1] Cythonizing av/plane.pyx
      Compiling av/format.pyx because it changed.
      [1/1] Cythonizing av/format.pyx
      Compiling av/enum.pyx because it changed.
      [1/1] Cythonizing av/enum.pyx
      Compiling av/bytesource.pyx because it changed.
      [1/1] Cythonizing av/bytesource.pyx
      Compiling av/stream.pyx because it changed.
      [1/1] Cythonizing av/stream.pyx
      Compiling av/packet.pyx because it changed.
      [1/1] Cythonizing av/packet.pyx
      Compiling av/frame.pyx because it changed.
      [1/1] Cythonizing av/frame.pyx
      Compiling av/option.pyx because it changed.
      [1/1] Cythonizing av/option.pyx
      Compiling av/buffer.pyx because it changed.
      [1/1] Cythonizing av/buffer.pyx
      Compiling av/utils.pyx because it changed.
      [1/1] Cythonizing av/utils.pyx
      Compiling av/descriptor.pyx because it changed.
      [1/1] Cythonizing av/descriptor.pyx
      
      Error compiling Cython file:
      ------------------------------------------------------------
      ...
      cdef const char *log_context_name(void *ptr) nogil:
          cdef log_context *obj = <log_context*>ptr
          return obj.name
      
      cdef lib.AVClass log_class
      log_class.item_name = log_context_name
                            ^
      ------------------------------------------------------------
      
      av/logging.pyx:216:22: Cannot assign type 'const char *(void *) except? NULL nogil' to 'const char *(*)(void *) noexcept nogil'. Exception values are incompatible. Suggest adding 'noexcept' to type 'const char *(void *) except? NULL nogil'.
      
      Error compiling Cython file:
      ------------------------------------------------------------
      ...
      
      # Start the magic!
      # We allow the user to fully disable the logging system as it will not play
      # nicely with subinterpreters due to FFmpeg-created threads.
      if os.environ.get('PYAV_LOGGING') != 'off':
          lib.av_log_set_callback(log_callback)
                                  ^
      ------------------------------------------------------------
      
      av/logging.pyx:351:28: Cannot assign type 'void (void *, int, const char *, va_list) except * nogil' to 'av_log_callback'. Exception values are incompatible. Suggest adding 'noexcept' to type 'void (void *, int, const char *, va_list) except * nogil'.
      Compiling av/logging.pyx because it changed.
      [1/1] Cythonizing av/logging.pyx
      Traceback (most recent call last):
        File "/srv/homeassistant/lib/python3.11/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 353, in <module>
          main()
        File "/srv/homeassistant/lib/python3.11/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 335, in main
          json_out['return_val'] = hook(**hook_input['kwargs'])
                                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/srv/homeassistant/lib/python3.11/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 118, in get_requires_for_build_wheel
          return hook(config_settings)
                 ^^^^^^^^^^^^^^^^^^^^^
        File "/tmp/pip-build-env-g3sxpfn8/overlay/lib/python3.11/site-packages/setuptools/build_meta.py", line 355, in get_requires_for_build_wheel
          return self._get_build_requires(config_settings, requirements=['wheel'])
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/tmp/pip-build-env-g3sxpfn8/overlay/lib/python3.11/site-packages/setuptools/build_meta.py", line 325, in _get_build_requires
          self.run_setup()
        File "/tmp/pip-build-env-g3sxpfn8/overlay/lib/python3.11/site-packages/setuptools/build_meta.py", line 507, in run_setup
          super(_BuildMetaLegacyBackend, self).run_setup(setup_script=setup_script)
        File "/tmp/pip-build-env-g3sxpfn8/overlay/lib/python3.11/site-packages/setuptools/build_meta.py", line 341, in run_setup
          exec(code, locals())
        File "<string>", line 157, in <module>
        File "/tmp/pip-build-env-g3sxpfn8/overlay/lib/python3.11/site-packages/Cython/Build/Dependencies.py", line 1134, in cythonize
          cythonize_one(*args)
        File "/tmp/pip-build-env-g3sxpfn8/overlay/lib/python3.11/site-packages/Cython/Build/Dependencies.py", line 1301, in cythonize_one
          raise CompileError(None, pyx_file)
      Cython.Compiler.Errors.CompileError: av/logging.pyx
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error

× Getting requirements to build wheel did not run successfully.
│ exit code: 1
╰─> See above for output.

note: This error originates from a subprocess, and is likely not a problem with pip.
2023-08-25 18:29:18.089 ERROR (SyncWorker_7) [homeassistant.util.package] Unable to install package ha-av==10.1.0: error: subprocess-exited-with-error
  
  × Getting requirements to build wheel did not run successfully.
  │ exit code: 1
  ╰─> [80 lines of output]
      Compiling av/_core.pyx because it changed.
      [1/1] Cythonizing av/_core.pyx
      Compiling av/error.pyx because it changed.
      [1/1] Cythonizing av/error.pyx
      Compiling av/plane.pyx because it changed.
      [1/1] Cythonizing av/plane.pyx
      Compiling av/format.pyx because it changed.
      [1/1] Cythonizing av/format.pyx
      Compiling av/enum.pyx because it changed.
      [1/1] Cythonizing av/enum.pyx
      Compiling av/bytesource.pyx because it changed.
      [1/1] Cythonizing av/bytesource.pyx
      Compiling av/stream.pyx because it changed.
      [1/1] Cythonizing av/stream.pyx
      Compiling av/packet.pyx because it changed.
      [1/1] Cythonizing av/packet.pyx
      Compiling av/frame.pyx because it changed.
      [1/1] Cythonizing av/frame.pyx
      Compiling av/option.pyx because it changed.
      [1/1] Cythonizing av/option.pyx
      Compiling av/buffer.pyx because it changed.
      [1/1] Cythonizing av/buffer.pyx
      Compiling av/utils.pyx because it changed.
      [1/1] Cythonizing av/utils.pyx
      Compiling av/descriptor.pyx because it changed.
      [1/1] Cythonizing av/descriptor.pyx
      
      Error compiling Cython file:
      ------------------------------------------------------------
      ...
      cdef const char *log_context_name(void *ptr) nogil:
          cdef log_context *obj = <log_context*>ptr
          return obj.name
      
      cdef lib.AVClass log_class
      log_class.item_name = log_context_name
                            ^
      ------------------------------------------------------------
      
      av/logging.pyx:216:22: Cannot assign type 'const char *(void *) except? NULL nogil' to 'const char *(*)(void *) noexcept nogil'. Exception values are incompatible. Suggest adding 'noexcept' to type 'const char *(void *) except? NULL nogil'.
      
      Error compiling Cython file:
      ------------------------------------------------------------
      ...
      
      # Start the magic!
      # We allow the user to fully disable the logging system as it will not play
      # nicely with subinterpreters due to FFmpeg-created threads.
      if os.environ.get('PYAV_LOGGING') != 'off':
          lib.av_log_set_callback(log_callback)
                                  ^
      ------------------------------------------------------------
      
      av/logging.pyx:351:28: Cannot assign type 'void (void *, int, const char *, va_list) except * nogil' to 'av_log_callback'. Exception values are incompatible. Suggest adding 'noexcept' to type 'void (void *, int, const char *, va_list) except * nogil'.
      Compiling av/logging.pyx because it changed.
      [1/1] Cythonizing av/logging.pyx
      Traceback (most recent call last):
        File "/srv/homeassistant/lib/python3.11/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 353, in <module>
          main()
        File "/srv/homeassistant/lib/python3.11/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 335, in main
          json_out['return_val'] = hook(**hook_input['kwargs'])
                                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/srv/homeassistant/lib/python3.11/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 118, in get_requires_for_build_wheel
          return hook(config_settings)
                 ^^^^^^^^^^^^^^^^^^^^^
        File "/tmp/pip-build-env-52zn1fji/overlay/lib/python3.11/site-packages/setuptools/build_meta.py", line 355, in get_requires_for_build_wheel
          return self._get_build_requires(config_settings, requirements=['wheel'])
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/tmp/pip-build-env-52zn1fji/overlay/lib/python3.11/site-packages/setuptools/build_meta.py", line 325, in _get_build_requires
          self.run_setup()
        File "/tmp/pip-build-env-52zn1fji/overlay/lib/python3.11/site-packages/setuptools/build_meta.py", line 507, in run_setup
          super(_BuildMetaLegacyBackend, self).run_setup(setup_script=setup_script)
        File "/tmp/pip-build-env-52zn1fji/overlay/lib/python3.11/site-packages/setuptools/build_meta.py", line 341, in run_setup
          exec(code, locals())
        File "<string>", line 157, in <module>
        File "/tmp/pip-build-env-52zn1fji/overlay/lib/python3.11/site-packages/Cython/Build/Dependencies.py", line 1134, in cythonize
          cythonize_one(*args)
        File "/tmp/pip-build-env-52zn1fji/overlay/lib/python3.11/site-packages/Cython/Build/Dependencies.py", line 1301, in cythonize_one
          raise CompileError(None, pyx_file)
      Cython.Compiler.Errors.CompileError: av/logging.pyx
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error

× Getting requirements to build wheel did not run successfully.
│ exit code: 1
╰─> See above for output.

note: This error originates from a subprocess, and is likely not a problem with pip.
2023-08-25 18:30:48.831 ERROR (SyncWorker_7) [homeassistant.util.package] Unable to install package ha-av==10.1.0: error: subprocess-exited-with-error
  
  × Getting requirements to build wheel did not run successfully.
  │ exit code: 1
  ╰─> [80 lines of output]
      Compiling av/_core.pyx because it changed.
      [1/1] Cythonizing av/_core.pyx
      Compiling av/error.pyx because it changed.
      [1/1] Cythonizing av/error.pyx
      Compiling av/plane.pyx because it changed.
      [1/1] Cythonizing av/plane.pyx
      Compiling av/format.pyx because it changed.
      [1/1] Cythonizing av/format.pyx
      Compiling av/enum.pyx because it changed.
      [1/1] Cythonizing av/enum.pyx
      Compiling av/bytesource.pyx because it changed.
      [1/1] Cythonizing av/bytesource.pyx
      Compiling av/stream.pyx because it changed.
      [1/1] Cythonizing av/stream.pyx
      Compiling av/packet.pyx because it changed.
      [1/1] Cythonizing av/packet.pyx
      Compiling av/frame.pyx because it changed.
      [1/1] Cythonizing av/frame.pyx
      Compiling av/option.pyx because it changed.
      [1/1] Cythonizing av/option.pyx
      Compiling av/buffer.pyx because it changed.
      [1/1] Cythonizing av/buffer.pyx
      Compiling av/utils.pyx because it changed.
      [1/1] Cythonizing av/utils.pyx
      Compiling av/descriptor.pyx because it changed.
      [1/1] Cythonizing av/descriptor.pyx
      
      Error compiling Cython file:
      ------------------------------------------------------------
      ...
      cdef const char *log_context_name(void *ptr) nogil:
          cdef log_context *obj = <log_context*>ptr
          return obj.name
      
      cdef lib.AVClass log_class
      log_class.item_name = log_context_name
                            ^
      ------------------------------------------------------------
      
      av/logging.pyx:216:22: Cannot assign type 'const char *(void *) except? NULL nogil' to 'const char *(*)(void *) noexcept nogil'. Exception values are incompatible. Suggest adding 'noexcept' to type 'const char *(void *) except? NULL nogil'.
      
      Error compiling Cython file:
      ------------------------------------------------------------
      ...
      
      # Start the magic!
      # We allow the user to fully disable the logging system as it will not play
      # nicely with subinterpreters due to FFmpeg-created threads.
      if os.environ.get('PYAV_LOGGING') != 'off':
          lib.av_log_set_callback(log_callback)
                                  ^
      ------------------------------------------------------------
      
      av/logging.pyx:351:28: Cannot assign type 'void (void *, int, const char *, va_list) except * nogil' to 'av_log_callback'. Exception values are incompatible. Suggest adding 'noexcept' to type 'void (void *, int, const char *, va_list) except * nogil'.
      Compiling av/logging.pyx because it changed.
      [1/1] Cythonizing av/logging.pyx
      Traceback (most recent call last):
        File "/srv/homeassistant/lib/python3.11/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 353, in <module>
          main()
        File "/srv/homeassistant/lib/python3.11/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 335, in main
          json_out['return_val'] = hook(**hook_input['kwargs'])
                                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/srv/homeassistant/lib/python3.11/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 118, in get_requires_for_build_wheel
          return hook(config_settings)
                 ^^^^^^^^^^^^^^^^^^^^^
        File "/tmp/pip-build-env-ankmfxtl/overlay/lib/python3.11/site-packages/setuptools/build_meta.py", line 355, in get_requires_for_build_wheel
          return self._get_build_requires(config_settings, requirements=['wheel'])
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/tmp/pip-build-env-ankmfxtl/overlay/lib/python3.11/site-packages/setuptools/build_meta.py", line 325, in _get_build_requires
          self.run_setup()
        File "/tmp/pip-build-env-ankmfxtl/overlay/lib/python3.11/site-packages/setuptools/build_meta.py", line 507, in run_setup
          super(_BuildMetaLegacyBackend, self).run_setup(setup_script=setup_script)
        File "/tmp/pip-build-env-ankmfxtl/overlay/lib/python3.11/site-packages/setuptools/build_meta.py", line 341, in run_setup
          exec(code, locals())
        File "<string>", line 157, in <module>
        File "/tmp/pip-build-env-ankmfxtl/overlay/lib/python3.11/site-packages/Cython/Build/Dependencies.py", line 1134, in cythonize
          cythonize_one(*args)
        File "/tmp/pip-build-env-ankmfxtl/overlay/lib/python3.11/site-packages/Cython/Build/Dependencies.py", line 1301, in cythonize_one
          raise CompileError(None, pyx_file)
      Cython.Compiler.Errors.CompileError: av/logging.pyx
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error

× Getting requirements to build wheel did not run successfully.
│ exit code: 1
╰─> See above for output.

note: This error originates from a subprocess, and is likely not a problem with pip.

I tried to follow the thread https://community.home-assistant.io/t/error-ha-av-with-2023-04/558497/7 by manually install ffmpeg release 6.0 or 4.4 but it doesn’t change anything.

I also tried to install ha-av with the following command “pip3 install ha-av”. The installation works properly but the error message is still present when I run hass.

Does anyone can help me please?

Thanks a lot for your help.

Hi everyone.
Any help?

Thanks.