开发者

How can I use the py2exe to change the python3.2's code to exe [duplicate]

This question already has answers here: Closed 10 years ago.

Possible Duplicate:

py2exe for Python 3.0

I read py2exe can create a standalone program using a Python v开发者_如何学编程ersion before the 3. How, using Python 3.2, create e.g. "Hello world.exe", please??


p2exe is pretty much dead, unless you are using 2.7 or less.

1) Look into cx-freeze

2) Install cx-freeze

3) Create your script (test.py):

print("Hello there, anyone else hate hello worlds?")

4) Create your setup.py file

from cx_Freeze import setup, Executable

 setup(
    name = "hatefulworld",
    version = "0.1",
    description = "I wish programming was this easy",
    executables = [Executable("test.py")])

5) Execute the python command:

python setup.py build

6) **Cross your fingers, and if it was successful change to build\exe directory, and run your program.


I am glad you asked for a hello world tutorial, and not a useful one because its never as easy as above.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜