Reputation: 49
When I try to run my project in order to read an image, OpenCV shows this error:
Traceback (most recent call last):
File "C:\Users\Krishhnandu\PycharmProjects\test\error.py", line 2, in <module>
print(cv2.__version__)
AttributeError: module 'cv2' has no attribute '__version__'
Upvotes: 0
Views: 184
Reputation: 4875
uninstall opencv using
pip uninstall opencv-python
pip uninstall opencv-contrib-python
Then reinstall using
pip install opencv-python
pip install opencv-contrib-python
Then use the following command
import cv2
print(cv2.__version__)
Upvotes: 1