(2020.1.2已解决)pyinstaller生成exe出错:RecursionError: maximum recursion depth exceeded
程序员文章站
2024-03-21 17:11:46
...
-
问题描述
如题所述:
-
解决方案1
采用
pyinstaller -F target.py
生成exe
过程中,会生成一个target.spec
文件,在此文件第二行加上如下两句:import sys sys.setrecursionlimit(5000) # 设置递归深度
然后运行此文件:
pyinstaller target.spec
因为
Python
的默认递归深度是1000,超过即会报错。 -
Refereneces
上一篇: 记一次context异常
下一篇: C# Windows 任务管理器