将 python 程序转换为可执行文件时遇到问题
我创建了一个存储在桌面上的简单 python 程序。使用 CMD,我将当前目录设置为文件所在的目录。
然后我使用 pyinstaller MAIN.py (其中 MAIN 是文件名)
但仍然显示找不到脚本。
编辑:问题在于名称。 'main' 是 python 的保留关键字/内置类。
I created a simple python program stored on desktop. Using CMD, I set the current directory as the one where the file is located.
Then i used pyinstaller MAIN.py (where MAIN is the filename)
But it's still showing that script is not found.
EDIT: The issue was with the name. 'main' is a reserved keyword/ inbuilt class for python.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
难道你保存的 MAIN.py 文件在 MAIN 后面有一个空格?至少在屏幕截图上看起来是这样的:)。所以[MAIN(space).py]。
could it be that you saved your MAIN.py file with a space after the MAIN? It looks at least on the screenshot like this :). So [MAIN(space).py].