I recently installed opencv-python-3.4.0.12 via pip install on Mac OS. When I run the Python interpreter, import cv2
works fine whereas import opencv
raises ModuleNotFoundError. However, when I run the Python3 Interpreter, import opencv
works fine whereas import cv2
raises ModuleNotFoundError.
What is the reason behind this difference and on a related note, should I use import opencv
or import cv2
? Does cv2
refer to OpenCV version 2?
You should import cv2
. OpenCV releases two types of Python interfaces, cv
and cv2
. latest one is cv2
. This will give you an idea whether you have installed opencv
correctly.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With