I have simple python file main.py:
import pygame
print("Hi There")
input()
I have installed pygame, and the default app to open .py files is set to python.exe, but when i double click the file it won't open. If i try the same without the import line it can run with no problem.
I tried to create run.bat file to open the python file:
python main.py
This is the console output:
pygame 1.9.6
Hello from the pygame community. https://www.pygame.org/contribute.html
Hi There
Everything runs without problem when using run.bat file.
So my question is why i cannot open the main.py file by just double-clicking, and how to make it work?