0

我在 Win XP x86 上运行 Python 3.3 和 cx_freeze 3.3 x86。

我在同一目录中有一个安装文件和我的应用程序文件,安装文件包含以下内容:

import sys
from cx_Freeze import setup, Executable

setup(  name = "Duplicate Finder x86",
    version = "1.0",
    description = "Duplicate Finder x86",
    options = {"build_exe": build_exe_options},
    executables = [Executable("Comparator Source.py", base=base)])

我尝试使用以下命令构建:

C:\Documents and Settings\user\Desktop\Construction Yard>C:\Python33\Python setup.py build

我收到这个错误:

Traceback (most recent call last):
  File "setup.py", line 7, in <module>
    options = <"build_exe": build_exe_options>,
NameError: name 'build_exe_options' is not defined

我没有使用 cx_freeze 的经验,但我觉得我已经准备好了大部分内容。关于我所缺少的任何帮助?

4

1 回答 1

0

我想通了。我使用的是文档页面上给出的示例设置脚本的修改版本。我需要删除不必要的部分,将其修改为以下内容:

import sys
from cx_Freeze import setup, Executable

setup(  name = "Duplicate Finder x86",
    version = "1.0",
    description = "Duplicate Finder x86",
    executables = [Executable("Comparator Source.py")])
于 2013-06-13T18:13:47.990 回答