Python: pyinstaller报错【Es ist ein RecursionError aufgetreten, bei dem die maximale Rekursionstiefe überschritten wurde】

Bei pyinstaller demo.py sind folgende Probleme aufgetreten:

=============================================================
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.

Lösung: Öffnen Sie die Datei demo.spec und fügen Sie die folgenden zwei Zeilen hinzu

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

Fügen Sie hier eine Bildbeschreibung ein
Dann

pyinstaller demo.spec

Sie können weiter packen

Ich denke du magst

Origin blog.csdn.net/weixin_35770067/article/details/131463459
Empfohlen
Rangfolge