pyinstaller creating EXE RuntimeError: maximum recursion depth exceeded while calling a Python object

前端 未结 9 1020
栀梦
栀梦 2020-11-29 18:51

I am running WinPython 3.4.4.3 with pyinstaller 3.2 (obtained via pip install pyinstaller).

Now I\'ve got some really simple Qt4 code that I want to convert to EXE a

相关标签:
9条回答
  • 2020-11-29 19:46

    Mustafa did guide me to the right direction, you have to increase the recursion limit. But the code has to be put to the beginning of the spec file and not in your python code:

    # -*- mode: python -*-
    import sys
    sys.setrecursionlimit(5000)
    

    Create the spec file with pyi-makespec first, edit it and then build by passing the spec file to the pyinstaller command. See the pyinstaller manual for more information about using spec files.

    Please make sure to use pyinstaller 3.2.0, with 3.2.1 you will get ImportError: cannot import name 'is_module_satisfies' (see the issue on GitHub)

    0 讨论(0)
  • 2020-11-29 19:51

    install pyinstaller last developer version:

    pip uninstall pyinstaller
    pip install https://github.com/pyinstaller/pyinstaller/archive/develop.zip
    
    0 讨论(0)
  • 2020-11-29 19:52

    You can make changes to the recursion limit in the following manner:

    import sys
    sys.setrecursionlimit(1000)
    
    0 讨论(0)
提交回复
热议问题