路径下会生成 ".spec"文件,用记事本打开后在开始第一行输入 import sys sys.setrecursionlimit(5000) 然后再重新打包就行了 pyinstaller xxx.spec 注意是spec文件