0

Possible Duplicate:
How can I make an EXE file from a Python program?

I am looking for a method in which i can run python program without having packages installed in the system. Is there any way by which we can directly run any python code as an *exe. or Should I make a executable file which has all packages in it.

The main reason behind this is, able to run python program on system which is not having python/packages in it.

Community
  • 1
  • 1
user1939565
  • 203
  • 3
  • 13
  • [Google](https://www.google.com/#hl=en&safe=off&tbo=d&spell=1&q=convert+Python+script+to+EXE&sa=X&ei=j_33UJCFBsfKrQHsooH4Bw&ved=0CC0QvwUoAA&bav=on.2,or.r_gc.r_pw.r_cp.r_qf.&bvm=bv.41018144,d.aWM&fp=5ba22b36fdca884f&biw=1234&bih=594) has your answer. – PenguinCoder Jan 17 '13 at 13:33
  • 2
    Here's an old post on this topic: http://stackoverflow.com/questions/203487/creating-self-contained-python-applications – Peter Wooster Jan 17 '13 at 13:34

2 Answers2

1

py2exe is what you want. This will build an executable from your source.

The downside is: it packs an interpreter with the exe, so the filesize might become bigger. And when you use external libraries, especially C-bindings, you'll have to make manual steps.

Thorsten Kranz
  • 12,492
  • 2
  • 39
  • 56
1

http://www.pyinstaller.org/ is another good option. Does a lot of the same things py2exe does and suffers from the same problems.

Dani Gehtdichnixan
  • 1,265
  • 1
  • 11
  • 21
  • Having used both pyinstaller and py2exe I have to say that pyinstaller makes it slightly easier to produce a single exe. – c0m4 Jan 17 '13 at 14:59