看上去似乎是某個庫自己遞歸遍歷超過了python的棧高度限制
搜索了一番,很快找到了解決辦法: https://stackoverflow.com/questions/38977929/pyinstaller-creating-exe-runtimeerror-maximum-recursion-depth-exceeded-while-ca
在此總結下解決步驟:
1)pyinstaller -F xxx.py
這一步肯定會報上述錯誤導致失敗,但是會產生一個xxx.spec文件
2)在xxx.spec文件中增加兩行(添加在原文件第二行):
import sys
sys.setrecursionlimit(5000)
3)pyinstaller xxx.spec
打包成功。