Python Forum
[Py2Exe] How can i convert py files to exe ?
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[Py2Exe] How can i convert py files to exe ?
#2
its hard to generally say do this without seeing what code you want compiled.

Because it depends on what 3rd party libs you add, your programs structure for resources, whether you want all python library within the exe or separate, etc.

You dont really need that much. You write a setup.py and then just execute
python setup.py build
to build the exe. And it will be in the dist directory.

Here is a setup.py example. the isSystemSLL function is there only a workaround for an issue with building pygame games. The rest of the options just says to throw everything in the exe and use the starter script called game.py in the same directory. You should in theory be able to download my repo, delete the exe, install pygame and py2exe and rebuild the exe in this case. You can tweak the options to see what different ones do
http://www.py2exe.org/

Usually its gerenally good to start with a hello world, and then work from there because everything you add in the program usually adds some complex issue in building the exe.
Recommended Tutorials:
Reply


Messages In This Thread
RE: [Py2Exe] How can i convert py files to exe ? - by metulburr - Sep-27-2017, 05:54 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  source for py2exe not working after 3.4 metulburr 2 2,581 Feb-28-2019, 01:42 PM
Last Post: metulburr
  In place of py2exe (for GNU/Linux systems) and MultiOS executables (Yes) Lachu 5 5,185 Jan-18-2019, 07:25 PM
Last Post: snippsat

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020