Py2exe worked pretty well in a single py file a few months ago. But when I tried it again today, it failed, reporting that the maximum recursion depth "RuntimeError: maximum recursion" was exceeded. As a result, I got an empty "dist" folder. The Py file works fine, it just cannot be compiled. I think something is wrong with the imported modules in the py file. But I canβt figure it out for sure. Does anyone know a solution?
The initial part of my py file is:
import xlrd import wx import wx.lib.filebrowsebutton as filebrowse from scipy.optimize import fsolve import math import threading from sympy import Symbol from sympy import solve
And the last few lines of the cmd window:
File "D:\Python27\lib\site-packages\py2exe\mf.py", line 332, in _safe_import_hook self.import_hook(name, caller, level=level) File "D:\Python27\lib\site-packages\py2exe\mf.py", line 719, in import_hook return Base.import_hook(self,name,caller,fromlist,level) File "D:\Python27\lib\site-packages\py2exe\mf.py", line 137, in import_hook m = self.load_tail(q, tail) File "D:\Python27\lib\site-packages\py2exe\mf.py", line 214, in load_tail m = self.import_module(head, mname, m) File "D:\Python27\lib\site-packages\py2exe\mf.py", line 724, in import_module r = Base.import_module(self,partnam,fqname,parent) File "D:\Python27\lib\site-packages\py2exe\mf.py", line 284, in import_module m = self.load_module(fqname, fp, pathname, stuff) File "D:\Python27\lib\site-packages\py2exe\mf.py", line 730, in load_module r = Base.load_module(self, fqname, fp, pathname, (suffix, mode, typ)) File "D:\Python27\lib\site-packages\py2exe\mf.py", line 314, in load_module self.scan_code(co, m) File "D:\Python27\lib\site-packages\py2exe\mf.py", line 423, in scan_code self._safe_import_hook(name, m, fromlist, level=level) File "D:\Python27\lib\site-packages\py2exe\mf.py", line 332, in _safe_import_hook self.import_hook(name, caller, level=level) File "D:\Python27\lib\site-packages\py2exe\mf.py", line 719, in import_hook return Base.import_hook(self,name,caller,fromlist,level) File "D:\Python27\lib\site-packages\py2exe\mf.py", line 134, in import_hook self.msg(3, "import_hook", name, caller, fromlist, level) RuntimeError: maximum recursion depth exceeded D:\Python27\py2exetemp>pause