I have an application that is based on Python. I want to distribute this application to users on different OS'es (primarily Linux, but various distributions).
What is the recommended way of doing this? I do not want users to have to install Python. I would like to distribute Python with the application (which is free software). Kinda like a statically compiled program.
So that installation of the entire application is just unzipping some files in a folder, and then both Python (and modules used) and the application is all contained in this folder (including subfolders).
How do other people distribute their Python programs?
It is a requirement that the application does not break if the user does install Python on their own or upgrades an existing python. This is why I need to distribute a copy of Python along with the application.
What is the recommended way of doing this? I do not want users to have to install Python.
Typically, Python programs are 'packaged' with disutils and installed for use with an existing Python interpreter.
see: Distributing Python Modules and Installing Python Modules
It is not common to bundle the whole interpreter inside your software distribution (though certainly possible).
For Windows: py2exe is my preferred solution; you can build an all-in-one .exe, including resources.
For Linux, either:
See http://www.pyinstaller.org/
Or, see cx_freeze
From their website:
About cx_Freeze
cx_Freeze is a set of scripts and modules for freezing Python scripts into executables, in much the same way that py2exe and py2app do. Unlike these two tools, cx_Freeze is cross platform and should work on any platform that Python itself works on. It supports Python 2.3 or higher (including Python 3), since it makes use of the zip import facility which was introduced in 2.3.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With