I usually use PyCharm
but, i was trying to run py
extension file from terminal.
I have already installed opencv-python
.
I tried pip3 install opencv-python
also. Nonetheless, I am having the same issue. But, I am able to run those files from PyCharm
.
Advertisement
Answer
It could be due to the fact that the terminal is using python2
version by default and you need to explicitly specify python3
while running the program to use python3
.
You can see the link How Should I Set Default Python Version In Windows? to set your default python version to python3
in Windows.