OpenCV on raspberry pi

I have recently gotten a raspberry pi 4B with 4GB of RAM. I have install 64bit raspbian operating system on this. I am now trying to use openCV with it. I have spent the last 2 days researching and trying new ways and nothing works.

From what I can tell opencv is installed but not in the Python path. How do I fix this. I am new could I have detailed instructions.

Here is the error message:

Python 3.11.1 (main, Jan 12 2023, 17:18:46) [GCC 10.2.1 20210110] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import cv2
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ModuleNotFoundError: No module named 'cv2'


how did you install the opencv-python or opencv-contrib-python package?

1 Like