Create single python executable module

13,375

Solution 1

That's what egg files are for. Read this: What are the advantages of packaging your python library/application as an .egg file?

Solution 2

For windows use py2exe , for linux use pyinstaller and for Mac use py2app

Using these tools you can have a setup.py which based on os will build the final binary.

I have tried all three and they work well, or you can use cx_freeze they claim to be cross-platform

Solution 3

Maybe py2exe can help you ..

py2exe is a Python Distutils extension which converts Python scripts into executable Windows programs, able to run without requiring a Python installation.

Tutorial > http://www.py2exe.org/index.cgi/Tutorial

Solution 4

You can kivy for python cross plat form application .

Kivy - Open source Python library for rapid development of applications that make use of innovative user interfaces, such as multi-touch apps

Share:
13,375
yart
Author by

yart

Updated on July 02, 2022

Comments

  • yart
    yart almost 2 years

    Guys, I have much python code in modules which are resides in several python packages and now I need to create single python executable module or file which will include all these files, so it will be working on windows and on linux servers. What are possible solutions and how this can be done?

  • yart
    yart over 14 years
    thank you and it obviously can help for windows but what about linux? Do you know if there is way to have one application but support several operation system?
  • Nandhini
    Nandhini over 14 years
    @mavnn but I have found py2exe much better