简体   繁体   中英

python cx_freeze error: no commands supplied

Hi I'm a python newbie trying out cx_Freeze and am obviously doing something wrong. The code is as basic as can be. hello.py is in the c:/python27 folder.

I'm using python 2.7 on Windows 7

import sys
from cx_Freeze import setup, Executable

setup(
    name = "Test_Run",
    version = "3.1",
    description = "Hello",
    executables = [Executable("hello.py", base = "Win32GUI")]) 

I'm getting the following when executing the script-

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

Where am i slipping up?

Danny

You are probably using python setup.py right? If so, that is the error you should get. As the error says, you need to give commands. build creates an executable with other mandatory files. bdist-msi creates an .msi installer. There are other commands, but you can search them easily.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM