几个月前,py2exe在相同的py文件上运行得非常好。 但是今天我再次尝试时,它报告了“RuntimeError:maximum recursion depth exceeded”,并且结果是获得一个空的“dist”文件夹。
Py文件正常工作,只是无法打包。 我猜测py文件中导入的模块有问题。 但我不能确定具体情况。 是否有人知道解决方法?
我的py文件的开头部分如下:
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
以下是cmd窗口的最后几行:
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