Skip to content
Advertisement

Unable to run python file from terminal

I usually use PyCharm but, i was trying to run py extension file from terminal.

enter image description here

I have already installed opencv-python. enter image description here

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.

Advertisement