您将该代码段放在要变成可执行文件的Python脚本的顶部,而不是放在规范中,也没有在其自己的脚本中。我在这里找到一个例子:
https://shanetully.com/2013/08/cross-platform-deployment-of-python-
applications-with-pyinstaller/

您将该代码段放在要变成可执行文件的Python脚本的顶部,而不是放在规范中,也没有在其自己的脚本中。我在这里找到一个例子:
https://shanetully.com/2013/08/cross-platform-deployment-of-python-
applications-with-pyinstaller/