出现原因:
这个错误意思是超过最大递归深度,python默认的递归深度默认是1000),因此当递归深度超过就会引发这样的异常。
解决方法:
1.执行pyinstaller -F XXX.py 它会在你的目录文件生成XXX.spec文件,然后报错,出现该类异常。
2.打开XXX.spec文件,在开头添加上面两行代码。
import sys
sys.setrecursionlimit(1000000)
3.继续执行打包,但是还文件名:pyinstaller -F XXX.spec ,执行该文件。
原文地址:https://www.cnblogs.com/patrickstar2019/p/11465220.html
时间: 2024-08-14 18:55:55