cx_Freeze: 无法输入 ExcelFormulaParser

cx_Freeze: cannot input ExcelFormulaParser

所以我正在尝试使用 cx_freeze.

将我的代码编译成 .exe

这是我用来编译它的代码...

from cx_Freeze import setup, Executable
import sys
import numpy.core._methods
import numpy.lib.format
from xlwt import ExcelFormulaParser


additional_mods = ['numpy.core._methods', 'numpy.lib.format']

setup(name='ReconApp',
      version='0.1',
      description='xyz.script',
      options = {'build_exe': {'includes': additional_mods}},
      executables = [Executable("reconciliation_application.py")])

代码编译 enter image description here 没有错误。 当我转到 运行 时,.exe 程序启动并关闭并出现此错误。

我注意到它不喜欢 xlwt 模块 ExcelFormulaParser 中的某些东西 by 我不知道错误是什么。

有什么建议吗?

尝试将 xlwt 库添加到设置选项,即

import sys, os
from cx_Freeze import setup, Executable

build_exe_options = {"packages": ["numpy", "matplotlib", "xlwt"]}

setup(
    name = "App",
    version = "1.0",
    description = "App ...",
    options = {"build_exe": build_exe_options},
    executables = [Executable("App.py", base = "Win32GUI")])