[英]Pyinstaller RecursionError: maximum recursion depth exceeded
我遇到了以下问题,如果我尝试使用 pyinstaller 生成 exe,我会收到以下错误消息:
RecursionError: maximum recursion depth exceeded while calling a Python object
我发现很多解决方案说我应该添加
import sys
sys.setrecursionlimit(5000)
到生成的.spec文件中。 这样就成功生成了.exe。 但是,如果我再尝试运行.exe,我会收到以下错误:
Failed to execute script pyi_rth_pkgres
尝试了其他帖子中提供的许多不同的解决方案,但都没有奏效。 有没有人知道如何解决它? 我在用着
PyInstaller: 3.6
Python: 3.7.6 (conda)
在另一台计算机上,我安装了旧版本的 Python 和 Pyinstaller,在那里它使用相同的脚本运行得非常好。
尝试选项--onefile。 如果可能,尽量简化您的代码(例如,使用模块而不是单个文件等)
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.