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
i'd try to increase recursion depth limit. Insert at the beginning of your file:
import sys
sys.setrecursionlimit(5000)
make new environment with pipenv and install just the requirements package. (unused package which you have on your environment will cause the increase of the size of .exe file and make this error happen ) i try with python 3.8 and it worked
I was facing the same issue. I tried most of the things suggested here. But, I could not solve the issue on my laptop. What worked for me is summarized below:
This should not create any recursion error. This will create a dist folder in your project directory. Your executable will present in this folder.
This worked for me
Run pyinstaller and stop it to generate the spec file :
pyinstaller filename.py
A file with .spec
as extension should be generated
Now add the following lines to the beginning of the spec file :
import sys
sys.setrecursionlimit(5000)
Now run the spec file using :
pyinstaller filename.spec
Even until March 2020, this issue has not been solved yet. As per some people's explanation, I increased setrecursionlimit in .spec file and tried to build it, but it did not work.
Through googling, I found out that this issue is caused by conflict of latest version of openpyxl and pyinstaller. Older version of openpyxl, such as 2.3.5 version, does not cause this issue.
As such, solution for this issue is as follows.
pip uninstall openpyxl
pip install openpyxl==2.3.5
Sometimes even the limit 5000 is not enough. It helped me to set limit to 20000. (in file 'filename.spec')
import sys
sys.setrecursionlimit(20000)