我有一个非常大的python应用程序,我试图使用cx_freeze进入一个Windows msi。
以下是我的脚本。我找到所有依赖包的唯一方法是执行构建。安装msi,执行程序然后python抱怨丢失的库。然后我手动包含它们并开始工作。
通常情况下,如果您看到某些内容包括" numpy.linalg._umath_linalg
"只有通过试验和错误才能找到,因为在脚本中我们只使用import numpy as Np
,但cxfreeze在构建期间不会获取所有依赖项。是否有一种简单的方法来包含所有模块而没有太多的反复试验?
build_exe_options = {"packages": ["PyQt4.QtCore",
"PyQt4.QtGui",
"glob",
"time",
"re",
"getpass",
"csv",
"numpy.lib.format",
"numpy.linalg",
"numpy.linalg._umath_linalg",
"numpy.linalg.lapack_lite",
"scipy.io.matlab.streams",
"scipy.integrate",
"scipy.integrate.vode",
"scipy.sparse.linalg.dsolve.umfpack",
"scipy.integrate.lsoda",
"scipy.special",
"scipy.special._ufuncs_cxx",
"scipy.sparse.csgraph._validation",
"matplotlib.pyplot",
"matplotlib.backends",
"matplotlib.backends.backend_qt4agg",
"sys"],
"excludes": ["pyzmq",
"wxpython",
"tables",
"zmq",
"wx",
"Tkinter"]}