你应该去你的文件夹并运行:
C:\Python27\mydir> python setup.py py2exe
或直接
C:\Python27\mydir> setup.py py2exe
回溯告诉你,你没有在命令行中为setup.py发送任何命令(在我的例子中为’py2exe’)
您可以看到以下命令:
C:\Python27\mydir>setup.py --help-commands
Standard commands:
build build everything needed to install
build_py "build" pure Python modules (copy to build directory)
build_ext build C/C++ extensions (compile/link to build directory)
build_clib build C/C++ libraries used by Python extensions
build_scripts "build" scripts (copy and fixup #! line)
clean clean up temporary files from 'build' command
install install everything from build directory
install_lib install all Python modules (extensions and pure Python)
install_headers install C/C++ header files
install_scripts install script