Script works in IDLE, but .py-file doesn't work

前端 未结 6 1959
误落风尘
误落风尘 2020-12-31 17:40

I have a tkinter script, which runs just fine in IDLE. However, when I double click the .py-file from Windows Explorer, the console window flashes half a second and then it

6条回答
  •  暖寄归人
    2020-12-31 18:37

    Have you updated your PATH environment variable so that your Python executable is found? You can find more information on how to do here - Using Python on Windows

    But you basically need to make sure that the folder containing python.exe (e.g. C:\Python32) is displayed when you type the following command from a prompt:

    echo %PATH%
    

提交回复
热议问题