py to exe : RecursionError: 调用Python对象时超过最大递归深度。

问题描述 投票:0回答:1

我试图将我的Python文件转换为一个exe使用以下库。

pyinstaller --onfile -w xxx.py

我也尝试了标志,但我得到以下错误。

RecursionError: maximum recursion depth exceeded while calling a Python object 

是什么问题?

python python-3.x exe pyinstaller
1个回答
0
投票

试试这个。

运行pyinstaller并停止它来生成规范文件。

pyinstaller filename.py

应该生成一个扩展名为.spec的文件

现在在规范文件的开头添加以下几行。

import sys sys.setrecursionlimit(5000)

现在使用.NET Framework 2.0运行规格文件。

pyinstaller filename.spec

© www.soinside.com 2019 - 2024. All rights reserved.