我正在使用 Python31 和 cx_freeze 在 Windows 机器上创建可执行文件。可执行文件可在所有 Windows 系统上完美运行。但它们不能在 Linux 上运行。我应该在 setup.py 文件中做哪些更改?我正在使用的是:
import sys
from cx_Freeze import setup, Executable
includes1 = list()
path1 = sys.path[:]
package=list()
executables = [Executable("D:\MyCode\MyFile.py")]
buildOptions = dict(\
includes = includes1,\
path = path1,\
packages = package)
setup( name = "NAME",
version = "0.1",
description = "DESCRIPTION",
options = dict(build_exe = buildOptions),
executables = executables)