到目前为止,我仅使用 py2exe 编译了 python2.7 文件。今天我尝试使用 3.3 版本的 py2exe 编译 python3.3 文件,但是 setup() 引发了一个我无法理解的异常(AttributeError: 'DebugOutput' object has no attribute 'errors'
) .
我认为使用不同的编译方法(cx_freeze 而不是 py2exe)也许可以解决我的问题,但我无法确切理解它们之间有什么区别。我应该在代码中更改哪些内容才能使其与 cx_freeze 一起使用? 这是我的设置():
setup(
version=ver,
description=name + ' by me',
author='me',
console=cons,
windows=wind,
data_files = [dats],
options = {'build_exe': {'bundle_files': 1, 'compressed': True, 'optimize': 2, 'ascii': True, 'excludes': ex, 'includes': inc, 'dist_dir': distDir}},
zipfile = None
)
最佳答案
关于python - 使用 cx_freeze 将 py2exe setup.py 文件转换为一个文件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24475092/