pyinstaller打包报错: RecursionError: maximum recursion depth exceeded 已经解决

看上去似乎是某个库自己递归遍历超过了python的栈高度限制

搜索了一番,很快找到了解决办法: https://stackoverflow.com/questions/38977929/pyinstaller-creating-exe-runtimeerror-maximum-recursion-depth-exceeded-while-ca

 

在此总结下解决步骤:

1)pyinstaller -F xxx.py 

这一步肯定会报上述错误导致失败,但是会产生一个xxx.spec文件

2)在xxx.spec文件中增加两行(添加在原文件第二行):

import sys
sys.setrecursionlimit(5000)
3)pyinstaller xxx.spec

打包成功。



posted @ 2019-10-29 23:15  web3网络科技  阅读(3057)  评论(0编辑  收藏  举报