You cannot execute your script directly when you click the .pyw Since you have made a GUI you have to change it into an executable file first using forexample py2exe, pyinstaller