关于cxfreeze打包Python脚本exe的有关问题

关于cxfreeze打包Python脚本exe的问题
本帖最后由 hu1020935219 于 2014-04-10 17:33:38 编辑
系统以及环境:
Windows 7 64 bit 
Python 3.3
脚本:两个脚本文件,目标是一个GUI app,用到tkinter模块,主脚本是main.py。

我首先实验的是这样的命令:
C:\Python33\Scripts>cxfreeze C:\Users\Administrator\Desktop\Network Programming\
windows\main.py --target-dir C:\Users\Administrator\Desktop\

结果出现了下面的提示错误,于是去了http://sourceforge.net/p/cx-freeze/mailman/cx-freeze-users/?viewmonth=201003,他的源码托管网站看邮件列表时候,发现有人和我一样的错误,用了有人回答的下面的命令,但是还是出错了。
下面是再次尝试生成脚本的命令以及错误提示:

C:\Python33\Scripts> cxfreeze base-name=Win32GUI C:\Users\Administrator\Desktop\Network Programming\windows\main.py



错误如下:
Usage: cxfreeze [options] [SCRIPT]

Freeze a Python script and all of its referenced modules to a base
executable which can then be distributed without requiring a Python
installation.

cxfreeze: error: only one script can be specified
------解决方案--------------------
路径带空格要用双引号括住,不然就变成多个参数了...
"C:\Users\Administrator\Desktop\Network Programming\windows\main.py"