
最近,我使用Python和Tkinter (和Pycharm)制作了一个聊天机器人。现在,我的bot在我制作的GUI中成功运行,但我打算将它转换为.exe文件,以便与我的朋友共享它。以下是我的不同脚本代码:
这是在控制台上运行它时出现的错误:PS C:\Users\User\output\main> main.exe main.exe :术语“main.exe”不能识别为cmdlet、函数、脚本文件或可操作程序的名称。检查名称的拼写,或者如果包含路径,请验证路径是否正确,然后再试一次。一行:1字符:1+ main.exe ++ CategoryInfo : ObjectNotFound:(main.exe:String) [],CommandNotFoundException + FullyQualifiedErrorId : CommandNotFoundException
发布于 2021-08-13 14:21:33
你可能在找Pyinstaller。
Pyinstaller用于将Python (.py)脚本转换为Standalone Application (.exe)
用法:
pyinstaller <scriptname.py> --icon=<icon.ico>:设置应用程序的图标。--onefile:将您的应用程序作为一个.exe文件。https://stackoverflow.com/questions/68772689
复制相似问题