Ask Your Question

Revision history [back]

I had this problem running opencv Version 3.4.1. Here is what I did.

SPECS: Raspberry pi 3B, OS: Raspbian, Version: 9 (Stretch), Python 3, opencv Version 3.4.1

*Check opencv version in python

*import cv2

*cv2.__version__

1) sudo pip install opencv-contrib-python

*After this I could not import cv2 in python until I installed the following.

2) sudo apt-get update

3) sudo apt-get install libhdf5-dev

4) sudo apt-get update

5) sudo apt-get install libhdf5-serial-dev libqtgui4 libqt4-test