“maximum recursion depth exceeded” while packaging py file with py2exe

前端 未结 3 1823
没有蜡笔的小新
没有蜡笔的小新 2021-01-13 02:37

The py2exe worked quite well on the same py file several months ago. But when I tried it again today it failed by reporting a “RuntimeError: maximum recursion depth exceeded

3条回答
  •  轮回少年
    2021-01-13 03:04

    It works for Pyinstaller

    Create a spec file

    pyi-makespec options name.py 
    

    Modify this spec by adding to start of file

    import sys
    sys.setrecursionlimit(5000) # or more
    

    Build the executable file

    pyi options name.spec 
    

提交回复
热议问题