Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Opencv integration library fails to load after python 3.10 update #74566

Closed
markfrancisonly opened this issue Jul 7, 2022 · 16 comments
Closed

Comments

@markfrancisonly
Copy link

The problem

opencv library is failing to load with error message:
No OpenCV library found! Install or compile for your system following instructions here: http://opencv.org/releases.html

Other custom components based on opencv are broken with the same requirements:

"requirements": ["numpy==1.23.0", "opencv-python-headless==4.6.0.66"]

What version of Home Assistant Core has the issue?

2022.7.0

What was the last working version of Home Assistant Core?

2022.6.7

What type of installation are you running?

Home Assistant Container

Integration causing the issue

OpenCV

Link to integration documentation on our website

https://www.home-assistant.io/integrations/opencv/

Diagnostics information

Version core-2022.7.0
Installation Type Home Assistant Container
Development false
Supervisor false
Docker true
User root
Virtual Environment false
Python Version 3.10.5
Operating System Family Linux
Operating System Version 5.15.0-40-generic
CPU Architecture x86_64
Timezone America/New_York
Configuration Directory /config

Example YAML snippet

No response

Anything in the logs that might be useful for us?

...

  import cv2
  File "/usr/local/lib/python3.10/site-packages/cv2/__init__.py", line 181, in <module>
    bootstrap()
  File "/usr/local/lib/python3.10/site-packages/cv2/__init__.py", line 153, in bootstrap
    native_module = importlib.import_module("cv2")
  File "/usr/local/lib/python3.10/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
ImportError: Error relocating /usr/local/lib/python3.10/site-packages/cv2/cv2.abi3.so: cblas_dgemm: symbol not found

Additional information

No response

@probot-home-assistant
Copy link

opencv documentation
opencv source
(message by IssueLinks)

@McGiverGim
Copy link

I can confirm the issue.

@kevdliu
Copy link
Contributor

kevdliu commented Jul 11, 2022

Getting the same errors on a Home Assistant OS setup with OS 8.2

@OkhammahkO
Copy link

Same issue.

@McGiverGim
Copy link

The problem remains in Home Assistant 2022.8.0...

@markfrancisonly
Copy link
Author

fortunately I was able to replace opencv with pillow for my application, maybe someone else here will have the same option

@McGiverGim
Copy link

The problem remains in september version...

@issue-triage-workflows
Copy link

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates.
Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍
This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.

@McGiverGim
Copy link

McGiverGim commented Jan 2, 2023

The error remains:

Logger: homeassistant.components.opencv.image_processing
Source: components/opencv/image_processing.py:105
Integration: opencv (documentation, issues)
First occurred: 21 de diciembre de 2022, 20:29:04 (1 occurrences)
Last logged: 21 de diciembre de 2022, 20:29:04

No OpenCV library found! Install or compile for your system following instructions here: http://opencv.org/releases.html

@issue-triage-workflows
Copy link

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates.
Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍
This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.

@OkhammahkO
Copy link

The error remains.

@sca075
Copy link

sca075 commented Apr 28, 2023

I found the solution there is to change on the manifest.json "numpy", "opencv-python-headless==4.7.0.72" this will install correctly openCV

@OkhammahkO
Copy link

OkhammahkO commented Apr 29, 2023

And it appears to be getting attention here:
#91871

@OkhammahkO
Copy link

I found the solution there is to change on the manifest.json "numpy", "opencv-python-headless==4.7.0.72" this will install correctly openCV

I can confirm this fixes my issue too! A bit more info for others, what I did was bascially copy the dev version of the opencv componet into my custom components folder and then make the opencv-python-headless version change. I also needed to add "version": "1.0"

https://github.com/home-assistant/core/tree/dev/homeassistant/components/opencv

image

@sca075
Copy link

sca075 commented Apr 29, 2023

I simply used "requirements": ["numpy", "opencv-python-headless==4.7.0.72"] Open CV use numpy as dependences normally it should not be needed to install it, anyhow.. I´ve also see Frank is working on it in the log of this component.

@issue-triage-workflows
Copy link

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates.
Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍
This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.

@issue-triage-workflows issue-triage-workflows bot closed this as not planned Won't fix, can't repro, duplicate, stale Aug 4, 2023
@github-actions github-actions bot locked and limited conversation to collaborators Sep 3, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

5 participants