解决 RecursionError: maximum recursion depth exceeded

设置主程序打包时,使用 pyinstaller -F -c 主程序.py,但是在使用pyinstaller打包时,如果报错“RecursionError: maximum recursion depth exceeded”,解决方法如下:

pyinstaller打包后生成了.spec文件,打开文件,在头部导入sys,设置递归调用限制次数,如图:

 执行pyinstaller -F 主程序.spec 就可以。

原文地址:https://www.cnblogs.com/myrx/p/14688859.html