使可执行文件成为python文件

时间:2017-03-07 01:31:31

标签: python python-2.7 cx-freeze

我发现cx_freeze允许为python文件创建一些可执行文件。所以我在python(hello.py)中有这个简单的代码:

print "Hello"

当我输入终端时:

python setup.py build

其中setup.py是这样的:

from cx_Freeze import setup, Executable


setup(

    name = "hello",

    version = "0.1",

    description = "this program say hello",

    executables = [Executable("hello.py")],

)

然后我有一个带有可执行文件hello的文件夹构建但是当我尝试执行时出现此错误消息:

ImportError: No module named __startup__

感谢您的帮助!

0 个答案:

没有答案
相关问题