python文件用py2exe tool转化成在windows .exe文件出错!

来源:互联网 发布:知秋都市文王剑刃 编辑:程序博客网 时间:2024/06/05 12:48

大家好,python新手。现遇到一个问题,请大家帮忙!


question description:
(1)setup.py code
from distutils.core import setup  
import py2exe  
includes = ["encodings", "encodings.*"]  
options = {"py2exe":  
            {   "compressed": 1,  
                "optimize": 2,  
                "includes": includes,  
                "bundle_files": 1 
            }  
          }  
setup(     
    version = "1.1.0",  
    description = "for shenzhen validation team to verify HILO",  
    name = "autotest",  
    options = options,  
    zipfile=None,  
    windows=[{"script": "autotest.py", "icon_resources": [(1, "logo.ico")] }],    
      
    ) 

(2)error information

Traceback (most recent call last):
  File "D:/Python project/Auto_Test_1.3/sources/setup.py", line 27, in <module>
    windows=[{"script": "autotest.py", "icon_resources": [(1, "logo.ico")]}],
  File "D:/Python25/lib/distutils/core.py", line 139, in setup
    except DistutilsArgError, msg:
SystemExit: usage: setup.py [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
   or: setup.py --help [cmd1 cmd2 ...]
   or: setup.py --help-commands
   or: setup.py cmd --help

error: no commands supplied

----->thanks

(1)python version:2.5

(2)py2exe version:2.5

原创粉丝点击