Failed to execute Script main


enter image description here

I recently made a chatbot using Python and Tkinter (and Pycharm).
Now my bot runs successfully in a GUI made by me but I am intending to convert it into a .exe file to share it with my friends.
Here are my codes of different scripts:

This was the error which came when I ran it on console:
PS C:\Users\User\output\main> main.exe main.exe : The term ‘main.exe’ is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again. At line:1 char:1 + main.exe + ~~~~~~~~ + CategoryInfo : ObjectNotFound: (main.exe:String) [], CommandNotFoundException + FullyQualifiedErrorId : CommandNotFoundException


The reason why it complains and didn’t complain when I ran the script from the first place or even using the command line "./" is because the file image existed in the same path as the script located but when pyinstaller created "dist" directory which has the app product it makes a perfect sense that the image file is not there and so I basically moved it to that dist directory where the clickable app is there!

Answered By – Sarvesh

This Answer collected from stackoverflow, is licensed under cc by-sa 2.5 , cc by-sa 3.0 and cc by-sa 4.0

Leave a Reply

(*) Required, Your email will not be published