Python 3.2.2,错误(exe脚本) [英] Python 3.2.2, error(scripts to exe)

查看:62
本文介绍了Python 3.2.2,错误(exe脚本)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好,我按照此说明进行操作(

Hello i follow this instructions (How can I use the py2exe to change the python3.2's code to exe) to create exe form python scripts(version 3.2.2), but it report me an error:

Traceback (most recent call last):
  File "C:\Python32\Scripts\setup.py", line 7, in <module>
    executables = [Executable("ochranka.py")])
  File "C:\Python32\lib\site-packages\cx_Freeze\dist.py", line 365, in setup
    distutils.core.setup(**attrs)
  File "C:\Python32\lib\distutils\core.py", line 136, in setup
    raise SystemExit(gen_usage(dist.script_name) + "\nerror: %s" % 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

这是我的setup.py文件:

This is my setup.py file:

from cx_Freeze import setup, Executable
setup(
    name = "Ochranka",
    version = "1.0",
    description = "test",
    executables = [Executable("ochranka.py")])

我是一个初学者,我不知道该怎么做.

I am a beginner, I do not know what to do with it.

推荐答案

您必须将命令传递给setup.py;在这种情况下,build *:

You have to pass a command to setup.py; in this case, build*:

python setup.py build

我敢打赌,您忘记了build部分.

I bet you forgot the build part.

*注意:我不是100%确定build是您想要的命令(自从我使用cx_freeze以来已经有一段时间了).请参阅文档.

*Note: I'm not 100% sure build is the command you want (it's been a while since I used cx_freeze). See the documentation.

这篇关于Python 3.2.2,错误(exe脚本)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆