opencv icon indicating copy to clipboard operation
opencv copied to clipboard

Attribute error

Open keerthanaggopala opened this issue 1 year ago • 1 comments

AttributeError: 'cv2.VideoCapture' object has no attribute 'getDevices'

keerthanaggopala avatar Mar 28 '23 11:03 keerthanaggopala

This error may come if you installed opencv previously without the e-consystems videoio module and the current build and install is not successful. Check in your build/lib directory of your OpenCV build. There should be a cv2.so file there (if both cmake and make executed without error). If the cv2.so file is present, manually copy it into both the system site-packages (or dist-packages) directory.

Then run the following command. $ sudo PYTHONPATH=”@release/lib/python3” LD_LIBRARY_PATH=”@release/lib” python3 main.py

These details are provided in OpenCV_Python_Installation_Linux_Manual_v1.4.pdf Page 11

J42-777 avatar Apr 19 '23 08:04 J42-777