Python:pyinstaller报错【A RecursionError maximum recursion depth exceeded occurred】

pyinstaller demo.py时出现如下问题:

=============================================================
A RecursionError (maximum recursion depth exceeded) occurred.
For working around please follow these instructions
=============================================================

1. In your program's .spec file add this line near the top::

     import sys ; sys.setrecursionlimit(sys.getrecursionlimit() * 5)

2. Build your program by running PyInstaller with the .spec file as
   argument::

     pyinstaller myprog.spec

3. If this fails, you most probably hit an endless recursion in
   PyInstaller. Please try to track this down has far as possible,
   create a minimal example so we can reproduce and open an issue at
   https://github.com/pyinstaller/pyinstaller/issues following the
   instructions in the issue template. Many thanks.

解决:打开demo.spec文件,添加下面两行

import sys
sys.setrecursionlimit(sys.getrecursionlimit()*5)

Python:pyinstaller报错【A RecursionError maximum recursion depth exceeded occurred】_第1张图片

然后pyinstaller demo.spec

==END ==

你可能感兴趣的:(Python)