remo.78
(Oleg)
September 18, 2019, 3:44am
1
Hello.
I have problems with the stream component. I have never used it and want to configure it. I include this component in the configuration file. I do a configuration check.
I have such an error:
“Configuration invalid
Component error: stream - Requirements for stream not found: [‘av == 6.1.2’]”.
The ffmpeg component is installed. The cameras are work:
$ ffmpeg -i INPUT -an -f null -
ffmpeg version N-94610-g9bcb1cb6ed Copyright (c) 2000-2019 the FFmpeg developers
built with gcc 8 (Raspbian 8.3.0-6 + rpi1)
configuration: --arch = armel --target-os = linux --enable-gpl --enable-libx264 --enable-nonfree
libavutil 56.33.100 / 56.33.100
libavcodec 58. 55.100 / 58. 55.100
libavformat 58.31.101 / 58.31.101
libavdevice 58.9.100 / 58.9.100
libavfilter 7. 58.100 / 7. 58.100
libswscale 5. 6.100 / 5. 6.100
libswresample 3. 6.100 / 3. 6.100
libpostproc 55.6.100 / 55.600
INPUT: No such file or directory
All dependencies are installed:
~ $ sudo apt-get install -y python-dev pkg-config libavformat-dev libavcodec-
dev libavdevice-dev libavutil-dev libswscale-dev libavresample-dev libavfilter-dev
Reading package lists ... Done
Building dependency tree
Reading state information ... Done
pkg-config is already the newest version (0.29-6).
python-dev is already the newest version (2.7.16-1).
libavcodec-dev is already the newest version (7: 4.1.4-1 + rpt1 ~ deb10u1).
libavdevice-dev is already the newest version (7: 4.1.4-1 + rpt1 ~ deb10u1).
libavfilter-dev is already the newest version (7: 4.1.4-1 + rpt1 ~ deb10u1).
libavformat-dev is already the newest version (7: 4.1.4-1 + rpt1 ~ deb10u1).
libavresample-dev is already the newest version (7: 4.1.4-1 + rpt1 ~ deb10u1).
libavutil-dev is already the newest version (7: 4.1.4-
1 + rpt1 ~ deb10u1).
libswscale-dev is already the newest version (7: 4.1.4-1 + rpt1 ~ deb10u1).
0 upgraded, 0 newly installed, 0 to remove and 170 not upgraded.
In the log the following error:
2019-09-18 08:28:11 ERROR (SyncWorker_5) [homeassistant.util.package] Unable to install package av == 6.1.2: Failed building wheel for av
Command “/ srv / homeassistant / bin / python3 -u -c” import setuptools, tokenize; __ file __ = ‘/ tmp / pip-install-55s03uo5 / 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-lzi8uto4/install-record.txt --single-version-externally-managed
–compile --install-headers /srv/homeassistant/include/site/python3.7/av "failed with error code 1 in / tmp / pip-install-55s03uo5 / av /
Help me please, what else can I do to make the component work?
You seem to only have python 2.7 not python 3.6 or higher.
remo.78
(Oleg)
September 18, 2019, 4:14am
3
I executed the command
$ python --version
Python 2.7.16
My configuration:
System Health
arch - armv7
dev - false
docker - false
hassio - false
os name - Linux
python version - 3.7.3
version - 0.98.5
virtualenv - true
remo.78
(Oleg)
September 18, 2019, 4:19am
4
list all available python versions:
~ $ ls /usr/bin/python*
/usr/bin/python /usr/bin/python3.7 /usr/bin/python3m
/usr/bin/python2 /usr/bin/python3.7-config /usr/bin/python3m-config
/usr/bin/python2.7 /usr/bin/python3.7m /usr/bin/python3-pasteurize
/usr/bin/python2.7-config /usr/bin/python3.7m-config /usr/bin/python3-pbr
/usr/bin/python2-config /usr/bin/python3-config /usr/bin/python-config
/usr/bin/python3 /usr/bin/python3-futurize
I removed Python 2 from alternatives and switched preferred Python versions.
~ $ sudo update-alternatives --remove python /usr/bin/python2.7
pi@raspberrypi:~ $ sudo update-alternatives --config python
There is 1 choice for the alternative python (providing /usr/bin/python).
Selection Path Priority Status
------------------------------------------------------------
0 /usr/bin/python3.7 1 auto mode
* 1 /usr/bin/python3.7 1 manual mode
Nothing changed. Same result.
Component error: stream - Requirements for stream not found: ['av==6.1.2'].
I executed the following command, and that’s what I got:
(homeassistant) homeassistant@raspberrypi:/home/pi $ pip3 install --upgrade av==6.1.2
Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple
Collecting av==6.1.2
Using cached https://files.pythonhosted.org/packages/05/e4/205b787753d25da5d927b59b7cf59c0b7563e3d18f35d228101658792c05/av-6.1.2.tar.gz
Building wheels for collected packages: av
Running setup.py bdist_wheel for av ... error
Complete output from command /srv/homeassistant/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-install-c75qlob2/av/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" bdist_wheel -d /tmp/pip-wheel-uclg7cwl --python-tag cp37:
running bdist_wheel
running build
running build_py
creating build
creating build/lib.linux-armv7l-3.7
creating build/lib.linux-armv7l-3.7/av
copying av/datasets.py -> build/lib.linux-armv7l-3.7/av
copying av/__main__.py -> build/lib.linux-armv7l-3.7/av
copying av/__init__.py -> build/lib.linux-armv7l-3.7/av
copying av/deprecation.py -> build/lib.linux-armv7l-3.7/av
creating build/lib.linux-armv7l-3.7/scratchpad
copying scratchpad/cctx_encode.py -> build/lib.linux-armv7l-3.7/scratchpad
copying scratchpad/merge-filmstrip.py -> build/lib.linux-armv7l-3.7/scratchpad
copying scratchpad/glproxy.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/decode_threads.py -> build/lib.linux-armv7l-3.7/scratchpad
copying scratchpad/second_seek_example.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/audio_player.py -> build/lib.linux-armv7l-3.7/scratchpad
copying scratchpad/show_frames_opencv.py -> build/lib.linux-armv7l-3.7/scratchpad
copying scratchpad/average.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/cctx_decode.py -> build/lib.linux-armv7l-3.7/scratchpad
copying scratchpad/graph.py -> build/lib.linux-armv7l-3.7/scratchpad
copying scratchpad/player.py -> build/lib.linux-armv7l-3.7/scratchpad
copying scratchpad/filmstrip.py -> build/lib.linux-armv7l-3.7/scratchpad
copying scratchpad/__init__.py -> build/lib.linux-armv7l-3.7/scratchpad
copying scratchpad/audio.py -> build/lib.linux-armv7l-3.7/scratchpad
copying scratchpad/dump_format.py -> build/lib.linux-armv7l-3.7/scratchpad
copying scratchpad/experimental.py -> build/lib.linux-armv7l-3.7/scratchpad
copying scratchpad/frame_seek_example.py -> build/lib.linux-armv7l-3.7/scratchpad
copying scratchpad/resource_use.py -> build/lib.linux-armv7l-3.7/scratchpad
copying scratchpad/seekmany.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/container
copying av/container/__init__.py -> build/lib.linux-armv7l-3.7/av/container
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
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/filter
copying av/filter/__init__.py -> build/lib.linux-armv7l-3.7/av/filter
creating build/lib.linux-armv7l-3.7/av/subtitles
copying av/subtitles/__init__.py -> build/lib.linux-armv7l-3.7/av/subtitles
running build_ext
running config
pkg-config returned flags we don't understand: -pthread -pthread
----------------------------------------
Failed building wheel for av
Running setup.py clean for av
Failed to build av
Installing collected packages: av
Running setup.py install for av ... error
Complete output from command /srv/homeassistant/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-install-c75qlob2/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-1i_gtkhp/install-record.txt --single-version-externally-managed --compile --install-headers /srv/homeassistant/include/site/python3.7/av:
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/datasets.py -> build/lib.linux-armv7l-3.7/av
copying av/__main__.py -> build/lib.linux-armv7l-3.7/av
copying av/__init__.py -> build/lib.linux-armv7l-3.7/av
copying av/deprecation.py -> build/lib.linux-armv7l-3.7/av
creating build/lib.linux-armv7l-3.7/scratchpad
copying scratchpad/cctx_encode.py -> build/lib.linux-armv7l-3.7/scratchpad
copying scratchpad/merge-filmstrip.py -> build/lib.linux-armv7l-3.7/scratchpad
copying scratchpad/glproxy.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/decode_threads.py -> build/lib.linux-armv7l-3.7/scratchpad
copying scratchpad/second_seek_example.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/audio_player.py -> build/lib.linux-armv7l-3.7/scratchpad
copying scratchpad/show_frames_opencv.py -> build/lib.linux-armv7l-3.7/scratchpad
copying scratchpad/average.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/cctx_decode.py -> build/lib.linux-armv7l-3.7/scratchpad
copying scratchpad/graph.py -> build/lib.linux-armv7l-3.7/scratchpad
copying scratchpad/player.py -> build/lib.linux-armv7l-3.7/scratchpad
copying scratchpad/filmstrip.py -> build/lib.linux-armv7l-3.7/scratchpad
copying scratchpad/__init__.py -> build/lib.linux-armv7l-3.7/scratchpad
copying scratchpad/audio.py -> build/lib.linux-armv7l-3.7/scratchpad
copying scratchpad/dump_format.py -> build/lib.linux-armv7l-3.7/scratchpad
copying scratchpad/experimental.py -> build/lib.linux-armv7l-3.7/scratchpad
copying scratchpad/frame_seek_example.py -> build/lib.linux-armv7l-3.7/scratchpad
copying scratchpad/resource_use.py -> build/lib.linux-armv7l-3.7/scratchpad
copying scratchpad/seekmany.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/container
copying av/container/__init__.py -> build/lib.linux-armv7l-3.7/av/container
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
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/filter
copying av/filter/__init__.py -> build/lib.linux-armv7l-3.7/av/filter
creating build/lib.linux-armv7l-3.7/av/subtitles
copying av/subtitles/__init__.py -> build/lib.linux-armv7l-3.7/av/subtitles
running build_ext
running config
pkg-config returned flags we don't understand: -pthread -pthread
----------------------------------------
Command "/srv/homeassistant/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-install-c75qlob2/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-1i_gtkhp/install-record.txt --single-version-externally-managed --compile --install-headers /srv/homeassistant/include/site/python3.7/av" failed with error code 1 in /tmp/pip-install-c75qlob2/av/