jeudi 22 mai 2014

wxPython - création d'une application exécutable avec Python - Stack Overflow


Let's say that I write a program in Python that uses wxPython. If I want my completed project to eventually run on someone else's computer, someone who probably isn't a programmer, what is this easiest way to do this?


Furthermore, if I package the Python script somehow, do I have to also include all of the modules that it was dependent on to run?


For example, if I import os and import wx, do the os and wx files have to be included in my final package?




You will want to use one of the following utilities:



  • py2exe

  • cx_freeze

  • bb_freeze

  • PyInstaller


The py2exe project hasn't been updated in a few years, so one of the others might be better. I wrote up tutorials on these that you are welcome to check out:



There is also a project called GUI2Exe which slaps a GUI front-end on all of these binary creation utilities and makes using them a bit easier. You can read about that on my blog too:




Let's say that I write a program in Python that uses wxPython. If I want my completed project to eventually run on someone else's computer, someone who probably isn't a programmer, what is this easiest way to do this?


Furthermore, if I package the Python script somehow, do I have to also include all of the modules that it was dependent on to run?


For example, if I import os and import wx, do the os and wx files have to be included in my final package?



You will want to use one of the following utilities:



  • py2exe

  • cx_freeze

  • bb_freeze

  • PyInstaller


The py2exe project hasn't been updated in a few years, so one of the others might be better. I wrote up tutorials on these that you are welcome to check out:



There is also a project called GUI2Exe which slaps a GUI front-end on all of these binary creation utilities and makes using them a bit easier. You can read about that on my blog too:



0 commentaires:

Enregistrer un commentaire