For a while now, I have been manual installing opencv-python into my docker image by bashing into it using:
sudo docker exec -it home-assistant /bin/bash
and running
pip install opencv-python
For the last few versions of HA, I am getting the error:
ERROR: Could not find a version that satisfies the requirement opencv-python (from versions: none)
I believe I have narrowed this problem down to the docker image not supporting the manylinux1 wheels and instead looking for linux_x86_64 tagged wheels (for which there are none for opencv-python).
When I run the following command from within docker
python3 -c "import wheel.pep425tags as w; print(w.get_supported())"
I get
[('cp37', 'cp37m', 'linux_x86_64'), ('cp37', 'abi3', 'linux_x86_64'), ('cp37', 'none', 'linux_x86_64'), ('cp36', 'abi3', 'linux_x86_64'), ('cp35', 'abi3', 'linux_x86_64'), ('cp34', 'abi3', 'linux_x86_64'), ('cp33', 'abi3', 'linux_x86_64'), ('cp32', 'abi3', 'linux_x86_64'), ('cp37', 'none', 'any'), ('cp3', 'none', 'any'), ('cp36', 'none', 'any'), ('cp35', 'none', 'any'), ('cp34', 'none', 'any'), ('cp33', 'none', 'any'), ('cp32', 'none', 'any'), ('cp31', 'none', 'any'), ('cp30', 'none', 'any'), ('py3', 'none', 'linux_x86_64'), ('py37', 'none', 'any'), ('py3', 'none', 'any'), ('py36', 'none', 'any'), ('py35', 'none', 'any'), ('py34', 'none', 'any'), ('py33', 'none', 'any'), ('py32', 'none', 'any'), ('py31', 'none', 'any'), ('py30', 'none', 'any')]
Then I try to find out what linux wheels are available by running:
pip3 -v install opencv-python | grep linux | grep 4.1.1.26 | grep cp36
Which gives me the following results:
Skipping link: none of the wheel's tags match: cp36-cp36m-manylinux1_i686: https://files.pythonhosted.org/packages/25/e6/eb2bdafab7e4707177760489812de21d68bdee98621b3fd425dac572c0e5/opencv_python-4.1.1.26-cp36-cp36m-manylinux1_i686.whl#sha256=db8313d755962a7dd61e5c22a651e0743208adfdb255c6ec8904ce9cb02940c6 (from https://pypi.org/simple/opencv-python/)
Skipping link: none of the wheel's tags match: cp36-cp36m-manylinux1_x86_64: https://files.pythonhosted.org/packages/5e/7e/bd5425f4dacb73367fddc71388a47c1ea570839197c2bcad86478e565186/opencv_python-4.1.1.26-cp36-cp36m-manylinux1_x86_64.whl#sha256=67d994c6b2b14cb9239e85dc7dfa6c08ef7cf6eb4def80c0af6141dfacc8cbb9 (from https://pypi.org/simple/opencv-python/)
I believe the opencv_python-4.1.1.26-cp36-cp36m-manylinux1_x86_64.whl should be compatible with my system, but I can’t figure out why it’s not supported by pip3 or how to modify the pip3 supported tags to force it to install.
Tensorflow seems to be slower and less reliable without opencv. Any help would be appreciated.