Config Invalid after upgrade to 102.3

This weekend I upgraded from version 100.2 to version 102.3. The upgrade went smooth and the frontend started without issue. However when I went to validate the configuration I got this error:

Configuration invalid
Component error: camera - Requirements for stream not found: ['av==6.1.2'].

I checked the logs and found a long bit of text about the error:

Sat Dec 07 2019 18:33:05 GMT-0500 (Eastern Standard Time)
Unable to install package av==6.1.2: ERROR: Command errored out with exit status 1:
     command: /Library/Frameworks/Python.framework/Versions/3.8/bin/python3.8 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/d6/8r_pph2d42vctsk2gtynh3wm0000gn/T/pip-install-_e_xy_sm/av/setup.py'"'"'; __file__='"'"'/private/var/folders/d6/8r_pph2d42vctsk2gtynh3wm0000gn/T/pip-install-_e_xy_sm/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 /private/var/folders/d6/8r_pph2d42vctsk2gtynh3wm0000gn/T/pip-record-ahhnd2_8/install-record.txt --single-version-externally-managed --prefix '' --compile --user --prefix=
         cwd: /private/var/folders/d6/8r_pph2d42vctsk2gtynh3wm0000gn/T/pip-install-_e_xy_sm/av/
    Complete output (53 lines):
    running install
    running build
    running build_py
    creating build
    creating build/lib.macosx-10.9-x86_64-3.8
    creating build/lib.macosx-10.9-x86_64-3.8/av
    copying av/deprecation.py -> build/lib.macosx-10.9-x86_64-3.8/av
    copying av/datasets.py -> build/lib.macosx-10.9-x86_64-3.8/av
    copying av/__init__.py -> build/lib.macosx-10.9-x86_64-3.8/av
    copying av/__main__.py -> build/lib.macosx-10.9-x86_64-3.8/av
    creating build/lib.macosx-10.9-x86_64-3.8/scratchpad
    copying scratchpad/encode_frames.py -> build/lib.macosx-10.9-x86_64-3.8/scratchpad
    copying scratchpad/encode.py -> build/lib.macosx-10.9-x86_64-3.8/scratchpad
    copying scratchpad/experimental.py -> build/lib.macosx-10.9-x86_64-3.8/scratchpad
    copying scratchpad/filmstrip.py -> build/lib.macosx-10.9-x86_64-3.8/scratchpad
    copying scratchpad/decode_threads.py -> build/lib.macosx-10.9-x86_64-3.8/scratchpad
    copying scratchpad/show_frames_opencv.py -> build/lib.macosx-10.9-x86_64-3.8/scratchpad
    copying scratchpad/second_seek_example.py -> build/lib.macosx-10.9-x86_64-3.8/scratchpad
    copying scratchpad/cctx_encode.py -> build/lib.macosx-10.9-x86_64-3.8/scratchpad
    copying scratchpad/graph.py -> build/lib.macosx-10.9-x86_64-3.8/scratchpad
    copying scratchpad/__init__.py -> build/lib.macosx-10.9-x86_64-3.8/scratchpad
    copying scratchpad/resource_use.py -> build/lib.macosx-10.9-x86_64-3.8/scratchpad
    copying scratchpad/merge-filmstrip.py -> build/lib.macosx-10.9-x86_64-3.8/scratchpad
    copying scratchpad/remux.py -> build/lib.macosx-10.9-x86_64-3.8/scratchpad
    copying scratchpad/dump_format.py -> build/lib.macosx-10.9-x86_64-3.8/scratchpad
    copying scratchpad/glproxy.py -> build/lib.macosx-10.9-x86_64-3.8/scratchpad
    copying scratchpad/player.py -> build/lib.macosx-10.9-x86_64-3.8/scratchpad
    copying scratchpad/audio_player.py -> build/lib.macosx-10.9-x86_64-3.8/scratchpad
    copying scratchpad/frame_seek_example.py -> build/lib.macosx-10.9-x86_64-3.8/scratchpad
    copying scratchpad/save_subtitles.py -> build/lib.macosx-10.9-x86_64-3.8/scratchpad
    copying scratchpad/cctx_decode.py -> build/lib.macosx-10.9-x86_64-3.8/scratchpad
    copying scratchpad/audio.py -> build/lib.macosx-10.9-x86_64-3.8/scratchpad
    copying scratchpad/average.py -> build/lib.macosx-10.9-x86_64-3.8/scratchpad
    copying scratchpad/decode.py -> build/lib.macosx-10.9-x86_64-3.8/scratchpad
    copying scratchpad/qtproxy.py -> build/lib.macosx-10.9-x86_64-3.8/scratchpad
    copying scratchpad/seekmany.py -> build/lib.macosx-10.9-x86_64-3.8/scratchpad
    creating build/lib.macosx-10.9-x86_64-3.8/av/video
    copying av/video/__init__.py -> build/lib.macosx-10.9-x86_64-3.8/av/video
    creating build/lib.macosx-10.9-x86_64-3.8/av/codec
    copying av/codec/__init__.py -> build/lib.macosx-10.9-x86_64-3.8/av/codec
    creating build/lib.macosx-10.9-x86_64-3.8/av/container
    copying av/container/__init__.py -> build/lib.macosx-10.9-x86_64-3.8/av/container
    creating build/lib.macosx-10.9-x86_64-3.8/av/audio
    copying av/audio/__init__.py -> build/lib.macosx-10.9-x86_64-3.8/av/audio
    creating build/lib.macosx-10.9-x86_64-3.8/av/subtitles
    copying av/subtitles/__init__.py -> build/lib.macosx-10.9-x86_64-3.8/av/subtitles
    creating build/lib.macosx-10.9-x86_64-3.8/av/filter
    copying av/filter/__init__.py -> build/lib.macosx-10.9-x86_64-3.8/av/filter
    creating build/lib.macosx-10.9-x86_64-3.8/av/data
    copying av/data/__init__.py -> build/lib.macosx-10.9-x86_64-3.8/av/data
    running build_ext
    running config
    pkg-config is required for building PyAV
    ----------------------------------------
ERROR: Command errored out with exit status 1: /Library/Frameworks/Python.framework/Versions/3.8/bin/python3.8 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/d6/8r_pph2d42vctsk2gtynh3wm0000gn/T/pip-install-_e_xy_sm/av/setup.py'"'"'; __file__='"'"'/private/var/folders/d6/8r_pph2d42vctsk2gtynh3wm0000gn/T/pip-install-_e_xy_sm/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 /private/var/folders/d6/8r_pph2d42vctsk2gtynh3wm0000gn/T/pip-record-ahhnd2_8/install-record.txt --single-version-externally-managed --prefix '' --compile --user --prefix= Check the logs for full command output.
Successfully saved

My set up, config files and plug-ins have not changed so not sure what to make of this. H/A starts and seems to run OK but I can’t check the validity of code changes. Has anyone else seen this or have any advice as to where the problem is coming from?

Home Assistant is running on a dedicated Mac, no virtual environments, no docker. Just a plain Jane simple install. Only other software running is Atom text editor and Git-Hub desktop. No extra Mac apps, mail or other stuff. Several restarts have not made any difference.

kartcon

pip3 install av==6.1.2

I also have this problem after upgrading to 102.3 on venv on a Raspbian buster.

None of the recommended package updates at https://www.home-assistant.io/integrations/stream/ work .

The issue appears to be with AV wheel refusing to build - not sure if its an ARM 64 issue or broader. I am using python3.7 (OP is using 3.8)

Here are the relevant errors on a pip3 -v build of AV.

  running config
  pkg-config returned flags we don't understand: -pthread -pthread
error
  Failed building wheel for av
  Running setup.py clean for av
  Running command /usr/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-install-9p826w0x/av/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" clean --all
  running clean
  removing 'build/lib.linux-armv7l-3.7' (and everything under it)
  'build/bdist.linux-armv7l' does not exist -- can't clean it
  'build/scripts-3.7' does not exist -- can't clean it
  removing 'build'
Failed to build av
Installing collected packages: av
  Created temporary directory: /tmp/pip-record-t6xxflz8
  Running setup.py install for av ...     Running command /usr/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-install-9p826w0x/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-t6xxflz8/install-record.txt --single-version-externally-managed --compile

    
    ----------------------------------------
 running config
    pkg-config returned flags we don't understand: -pthread -pthread
error
Cleaning up...
  Removing source in /tmp/pip-install-9p826w0x/av
Removed build tracker '/tmp/pip-req-tracker-jq33vs90'
Command "/usr/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-install-9p826w0x/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-t6xxflz8/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-install-9p826w0x/av/
Exception information:
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/pip/_internal/cli/base_command.py", line 143, in main
    status = self.run(options, args)
  File "/usr/lib/python3/dist-packages/pip/_internal/commands/install.py", line 386, in run
    use_user_site=options.use_user_site,
  File "/usr/lib/python3/dist-packages/pip/_internal/req/__init__.py", line 49, in install_given_reqs
    **kwargs
  File "/usr/lib/python3/dist-packages/pip/_internal/req/req_install.py", line 791, in install
    spinner=spinner,
  File "/usr/lib/python3/dist-packages/pip/_internal/utils/misc.py", line 723, in call_subprocess
    % (command_desc, proc.returncode, cwd))
pip._internal.exceptions.InstallationError: Command "/usr/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-install-9p826w0x/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-t6xxflz8/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-install-9p826w0x/av/

Two days down and still trying.

I found this issue by searching for that message.

That one at least should be easily fixed - just install that missing package :wink:

Thanks Tinkerer :slight_smile:

That library is installed on buster - although I’ve just noted its installed in the python2.7 directory - and although I have a faint memory of installing it on python3 sometime in the middle of last night’s attempt to make this work, I’m now getting a 404 error with pip3 install pkg-config
“Could not install packages due to an EnvironmentError: 404 Client Error: Not Found for url: https://pypi.org/simple/pkg-config/
This is also the case with pip3.8 install …

I found if you disable the camera component this error vanishes, but there are better workarounds

@Tinkerer @kartcon

Confirmed - don’t do the batch installs, especially in relation to PyAV
The pip3 alias to the repository for pkg-config is wrong.
Instead do

  • pip3 install pkgconfig
  • then
  • pip3 install av==6.1.2


Unfortunately I’m still getting stream errors in HA but they are now at least different.

  File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/setup.py", line 172, in _async_setup_component
    hass, processed_config
  File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/components/stream/__init__.py", line 107, in async_setup
    from .recorder import async_setup_recorder
  File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/components/stream/recorder.py", line 6, in <module>
    import av
  File "/srv/homeassistant/lib/python3.7/site-packages/av/__init__.py", line 9, in <module>
    from av._core import time_base, pyav_version as __version__
ImportError: /srv/homeassistant/lib/python3.7/site-packages/av/_core.cpython-37m-arm-linux-gnueabihf.so: undefined symbol: swscale_licens

Is there any solution to this problem yet. I have tried all the different suggestions but I still cant install av. I have HA installed in a venv and I have tried to install av manually inside and outside the venv. I get the same error message in both cases.

Collecting av==6.1.2
  Using cached https://files.pythonhosted.org/packages/05/e4/205b787753d25da5d927b59b7cf59c0b7563e3d18f35d228101658792c05/av-6.1.2.tar.gz
Installing collected packages: av
    Running setup.py install for av ... error
    ERROR: Command errored out with exit status 1:
     command: /usr/local/bin/python3.7 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-e4cte3eb/av/setup.py'"'"'; __file__='"'"'/tmp/pip-install-e4cte3eb/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-kp4ub6co/install-record.txt --single-version-externally-managed --compile
         cwd: /tmp/pip-install-e4cte3eb/av/
    Complete output (53 lines):
    running install
    running build
    running build_py
    creating build
    creating build/lib.linux-armv7l-3.7
    creating build/lib.linux-armv7l-3.7/av
    copying av/__init__.py -> build/lib.linux-armv7l-3.7/av
    copying av/__main__.py -> build/lib.linux-armv7l-3.7/av
    copying av/deprecation.py -> build/lib.linux-armv7l-3.7/av
    copying av/datasets.py -> build/lib.linux-armv7l-3.7/av
    creating build/lib.linux-armv7l-3.7/scratchpad
    copying scratchpad/second_seek_example.py -> build/lib.linux-armv7l-3.7/scratchpad
    copying scratchpad/glproxy.py -> build/lib.linux-armv7l-3.7/scratchpad
    copying scratchpad/graph.py -> build/lib.linux-armv7l-3.7/scratchpad
    copying scratchpad/cctx_decode.py -> build/lib.linux-armv7l-3.7/scratchpad
    copying scratchpad/encode_frames.py -> build/lib.linux-armv7l-3.7/scratchpad
    copying scratchpad/remux.py -> build/lib.linux-armv7l-3.7/scratchpad
    copying scratchpad/__init__.py -> build/lib.linux-armv7l-3.7/scratchpad
    copying scratchpad/seekmany.py -> build/lib.linux-armv7l-3.7/scratchpad
    copying scratchpad/merge-filmstrip.py -> build/lib.linux-armv7l-3.7/scratchpad
    copying scratchpad/audio_player.py -> build/lib.linux-armv7l-3.7/scratchpad
    copying scratchpad/resource_use.py -> build/lib.linux-armv7l-3.7/scratchpad
    copying scratchpad/average.py -> build/lib.linux-armv7l-3.7/scratchpad
    copying scratchpad/filmstrip.py -> build/lib.linux-armv7l-3.7/scratchpad
    copying scratchpad/player.py -> build/lib.linux-armv7l-3.7/scratchpad
    copying scratchpad/show_frames_opencv.py -> build/lib.linux-armv7l-3.7/scratchpad
    copying scratchpad/encode.py -> build/lib.linux-armv7l-3.7/scratchpad
    copying scratchpad/qtproxy.py -> build/lib.linux-armv7l-3.7/scratchpad
    copying scratchpad/decode.py -> build/lib.linux-armv7l-3.7/scratchpad
    copying scratchpad/save_subtitles.py -> build/lib.linux-armv7l-3.7/scratchpad
    copying scratchpad/experimental.py -> build/lib.linux-armv7l-3.7/scratchpad
    copying scratchpad/dump_format.py -> build/lib.linux-armv7l-3.7/scratchpad
    copying scratchpad/cctx_encode.py -> build/lib.linux-armv7l-3.7/scratchpad
    copying scratchpad/frame_seek_example.py -> build/lib.linux-armv7l-3.7/scratchpad
    copying scratchpad/audio.py -> build/lib.linux-armv7l-3.7/scratchpad
    copying scratchpad/decode_threads.py -> build/lib.linux-armv7l-3.7/scratchpad
    creating build/lib.linux-armv7l-3.7/av/audio
    copying av/audio/__init__.py -> build/lib.linux-armv7l-3.7/av/audio
    creating build/lib.linux-armv7l-3.7/av/filter
    copying av/filter/__init__.py -> build/lib.linux-armv7l-3.7/av/filter
    creating build/lib.linux-armv7l-3.7/av/container
    copying av/container/__init__.py -> build/lib.linux-armv7l-3.7/av/container
    creating build/lib.linux-armv7l-3.7/av/subtitles
    copying av/subtitles/__init__.py -> build/lib.linux-armv7l-3.7/av/subtitles
    creating build/lib.linux-armv7l-3.7/av/video
    copying av/video/__init__.py -> build/lib.linux-armv7l-3.7/av/video
    creating build/lib.linux-armv7l-3.7/av/codec
    copying av/codec/__init__.py -> build/lib.linux-armv7l-3.7/av/codec
    creating build/lib.linux-armv7l-3.7/av/data
    copying av/data/__init__.py -> build/lib.linux-armv7l-3.7/av/data
    running build_ext
    running config
    pkg-config returned flags we don't understand: -pthread -pthread
    ----------------------------------------
ERROR: Command errored out with exit status 1: /usr/local/bin/python3.7 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-e4cte3eb/av/setup.py'"'"'; __file__='"'"'/tmp/pip-install-e4cte3eb/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-kp4ub6co/install-record.txt --single-version-externally-managed --compile Check the logs for full command output.

Possibly covered by the troubleshooting notes?

This morning I did exactly as Brandon G described:

and got the same results as Jerry_OR. Hopefully someone can come up with a solution that works soon. Both my WAF (Wife appreciation factor) and SQ (satisfaction quotient) are taking a hit. I saw the same kinda thing happen on the VERA platform; a rush to roll out more features leading to greater and greater usability issues. HA is a great platform that SIMPLY needs to work. Roll out the bells and whistles slowly and with lots of testing. The last few upgrades have been the most problematic by far.

Yes, I tried all these but no good, all showing latest versions installed. I also re-installed / compiled x264 and ffmpeg as suggested in some posts. Finally I have just upgraded to 0.103.0 and I’m getting the same error message.

Are you using the streams compoent?

After posting earlier that the pip3 install av==6.1.2 did not work, I decided to wipe my Mac, reinstall Mac Mojave 10.14.6 and then try again. pip3 install pkgconfig went just fine but pip3 install av==6.1.2 failed again. It is important to note that Home Assistant has NOT been installed yet. There is literally nothing else running on this fresh install and yet this package still fails!

Below is the output I get when trying to install the AV package:

HA-iMac:~ art$ pip3 install pkgconfig
Collecting pkgconfig
Downloading https://files.pythonhosted.org/packages/b4/2c/bf434cb5a6590417e1d4468050ec317ea17fd6231c2a256df4646c11e588/pkgconfig-1.5.1-py2.py3-none-any.whl
Installing collected packages: pkgconfig
Successfully installed pkgconfig-1.5.1
You are using pip version 18.1, however version 19.3.1 is available.
You should consider upgrading via the ‘pip install --upgrade pip’ command.
HA-iMac:~ art$ pip3 install av==6.1.2
Collecting av==6.1.2
Downloading https://files.pythonhosted.org/packages/05/e4/205b787753d25da5d927b59b7cf59c0b7563e3d18f35d228101658792c05/av-6.1.2.tar.gz (2.1MB)
100% |████████████████████████████████| 2.1MB 3.1MB/s
Installing collected packages: av
Running setup.py install for av … error
Complete output from command /Library/Frameworks/Python.framework/Versions/3.7/bin/python3.7 -u -c “import setuptools, tokenize;file=‘/private/var/folders/z6/1pyy87kn0tx2cvcw2lk6qw4c0000gn/T/pip-install-q3fmarg3/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 /private/var/folders/z6/1pyy87kn0tx2cvcw2lk6qw4c0000gn/T/pip-record-fqlowwtr/install-record.txt --single-version-externally-managed --compile:
running install
running build
running build_py
creating build
creating build/lib.macosx-10.6-intel-3.7
creating build/lib.macosx-10.6-intel-3.7/av
copying av/deprecation.py → build/lib.macosx-10.6-intel-3.7/av
copying av/datasets.py → build/lib.macosx-10.6-intel-3.7/av
copying av/init.py → build/lib.macosx-10.6-intel-3.7/av
copying av/main.py → build/lib.macosx-10.6-intel-3.7/av
creating build/lib.macosx-10.6-intel-3.7/scratchpad
copying scratchpad/encode_frames.py → build/lib.macosx-10.6-intel-3.7/scratchpad
copying scratchpad/encode.py → build/lib.macosx-10.6-intel-3.7/scratchpad
copying scratchpad/experimental.py → build/lib.macosx-10.6-intel-3.7/scratchpad
copying scratchpad/filmstrip.py → build/lib.macosx-10.6-intel-3.7/scratchpad
copying scratchpad/decode_threads.py → build/lib.macosx-10.6-intel-3.7/scratchpad
copying scratchpad/show_frames_opencv.py → build/lib.macosx-10.6-intel-3.7/scratchpad
copying scratchpad/second_seek_example.py → build/lib.macosx-10.6-intel-3.7/scratchpad
copying scratchpad/cctx_encode.py → build/lib.macosx-10.6-intel-3.7/scratchpad
copying scratchpad/graph.py → build/lib.macosx-10.6-intel-3.7/scratchpad
copying scratchpad/init.py → build/lib.macosx-10.6-intel-3.7/scratchpad
copying scratchpad/resource_use.py → build/lib.macosx-10.6-intel-3.7/scratchpad
copying scratchpad/merge-filmstrip.py → build/lib.macosx-10.6-intel-3.7/scratchpad
copying scratchpad/remux.py → build/lib.macosx-10.6-intel-3.7/scratchpad
copying scratchpad/dump_format.py → build/lib.macosx-10.6-intel-3.7/scratchpad
copying scratchpad/glproxy.py → build/lib.macosx-10.6-intel-3.7/scratchpad
copying scratchpad/player.py → build/lib.macosx-10.6-intel-3.7/scratchpad
copying scratchpad/audio_player.py → build/lib.macosx-10.6-intel-3.7/scratchpad
copying scratchpad/frame_seek_example.py → build/lib.macosx-10.6-intel-3.7/scratchpad
copying scratchpad/save_subtitles.py → build/lib.macosx-10.6-intel-3.7/scratchpad
copying scratchpad/cctx_decode.py → build/lib.macosx-10.6-intel-3.7/scratchpad
copying scratchpad/audio.py → build/lib.macosx-10.6-intel-3.7/scratchpad
copying scratchpad/average.py → build/lib.macosx-10.6-intel-3.7/scratchpad
copying scratchpad/decode.py → build/lib.macosx-10.6-intel-3.7/scratchpad
copying scratchpad/qtproxy.py → build/lib.macosx-10.6-intel-3.7/scratchpad
copying scratchpad/seekmany.py → build/lib.macosx-10.6-intel-3.7/scratchpad
creating build/lib.macosx-10.6-intel-3.7/av/video
copying av/video/init.py → build/lib.macosx-10.6-intel-3.7/av/video
creating build/lib.macosx-10.6-intel-3.7/av/codec
copying av/codec/init.py → build/lib.macosx-10.6-intel-3.7/av/codec
creating build/lib.macosx-10.6-intel-3.7/av/container
copying av/container/init.py → build/lib.macosx-10.6-intel-3.7/av/container
creating build/lib.macosx-10.6-intel-3.7/av/audio
copying av/audio/init.py → build/lib.macosx-10.6-intel-3.7/av/audio
creating build/lib.macosx-10.6-intel-3.7/av/subtitles
copying av/subtitles/init.py → build/lib.macosx-10.6-intel-3.7/av/subtitles
creating build/lib.macosx-10.6-intel-3.7/av/filter
copying av/filter/init.py → build/lib.macosx-10.6-intel-3.7/av/filter
creating build/lib.macosx-10.6-intel-3.7/av/data
copying av/data/init.py → build/lib.macosx-10.6-intel-3.7/av/data
running build_ext
running config
pkg-config is required for building PyAV

----------------------------------------

Command “/Library/Frameworks/Python.framework/Versions/3.7/bin/python3.7 -u -c “import setuptools, tokenize;file=‘/private/var/folders/z6/1pyy87kn0tx2cvcw2lk6qw4c0000gn/T/pip-install-q3fmarg3/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 /private/var/folders/z6/1pyy87kn0tx2cvcw2lk6qw4c0000gn/T/pip-record-fqlowwtr/install-record.txt --single-version-externally-managed --compile” failed with error code 1 in /private/var/folders/z6/1pyy87kn0tx2cvcw2lk6qw4c0000gn/T/pip-install-q3fmarg3/av/
You are using pip version 18.1, however version 19.3.1 is available.
You should consider upgrading via the ‘pip install --upgrade pip’ command.

Since no other software is running this simply can not be the fault of another component, and the problem must lie in its source. We need a short term solution for how to disable this requirement until the problem can be resolved, and a solution on how to validate the setup in the mean time.

Also the very last line of the install output just before the separator line reads: pkg-config is required for building PyAV. If you actually try to install that (with the hyphen) you get this:

HA-iMac:~ art$ pip3 install pkg-config

ERROR: Could not find a version that satisfies the requirement pkg-config (from versions: none)

ERROR: No matching distribution found for pkg-config

which leads me to wonder if there is a typo somewhere. Next step is to re-install HA, rebuild my system and hope there is an answer soon.

Bit of an outlier question, but did you try as sudo? I know its frowned upon but sometimes brute force is the only way.

Also, yes, I think there is an issue with the pkg-config not being listed in the repository with the hyphen which may lead to an include problem on build, but I haven’t had the time to trawl through the .py code to find it.

Unfortunately I did get av==6.1.2 to install, but have hit the other import error relating to swscale_license causing stream to fail.

If you are not using the streams component there is a way around the AV error.

If you take out the Stream component but have Cameras configured, you still get the error when you check configuration. However the cameras seem to work fine.

according to another post I read, pkg-config should be installed like:

sudo pip3 install pkgconfig

I installed it and it made no difference. Also installed it in the venv, same result.

I found the patch in this issue thread worked for me, my camera works with the unofficial fix

i’m not using the stream component however

Thanks Codec303. The patch removed the annoying error and I’m not using stream for now.