在linux上使用pyinstaller将python编译为二进制时未定义退出
我有一个套接字服务器python脚本,它在linux上运行良好,但当使用pyinstaller在linux上编译为二进制时,它会在有线情况下运行在linux上使用pyinstaller将python编译为二进制时未定义退出,python,string,compilation,exit,pyinstaller,Python,String,Compilation,Exit,Pyinstaller,我有一个套接字服务器python脚本,它在linux上运行良好,但当使用pyinstaller在linux上编译为二进制时,它会在有线情况下运行 File "<string>", line 426, in <module> File "<string>", line 49, in __init__ NameError: global name 'exit' is not defined 下面是一个可以重新创建此错误的简单测试脚本 节目: exit.__cla
File "<string>", line 426, in <module>
File "<string>", line 49, in __init__
NameError: global name 'exit' is not defined
下面是一个可以重新创建此错误的简单测试脚本
节目:
exit.__class__
编译命令:
pyinstaller.py -F --noconsole --out=/output_folder/ /source/path
预计将打印出:
<class 'site.Quitter'>
希望有人能给我一个线索,一个共享库的东西?解决了,显式使用sys.exit(1)跳过这个
<class 'site.Quitter'>