SOLVED by doing this in bash: pip3 install opencv-contrib-python
Thank you Kasonnara!
I am dabbling with qr codes in Python.
I installed like this:
sudo apt install opencv-python3
I am following the instructions here.
When I get to: detector = cv2.QRCodeDetector() I get this error in the Python shell:
detector = cv2.QRCodeDetector() Traceback (most recent call last): File "<pyshell#20>", line 1, in detector = cv2.QRCodeDetector() AttributeError: module 'cv2' has no attribute 'QRCodeDetector'
Can I add the detector somehow?
Are the Ubuntu binaries incomplete?
Should I uninstall then reinstall from source code??
In the Idle shell I get:
cv2 <module 'cv2' from '/usr/lib/python3/dist-packages/cv2.cpython-36m-x86_64-linux-gnu.so'> len(dir(cv2)) 1704
The length is shorter than other users' reported length. Maybe some modules are missing??
0 Answers