I'm building a Python application and don't want to force my clients to install Python and modules. I also want to make my application closed-source.
So, is there a way to compile Python scripts to standalone executables?
I'm building a Python application and don't want to force my clients to install Python and modules. I also want to make my application closed-source.
So, is there a way to compile Python scripts to standalone executables?
Use py2exe.... use below set up files:
For Python 3.2 scripts the only choice is Cxfreeze. Build it from sources otherwise it won't work.
For python 2.x I suggest pyinstaller as it can package a python program in a single executable, unlike CxFreeze which outputs also libraries.
You can find the list of distribution utilities listed @ https://wiki.python.org/moin/DistributionUtilities.
I use bbfreeze and it has been working very well (yet to have python 3 support though).
you may like py2exe. you'll also find in there infos for doing it on linux
You can use py2exe as already answered and use cython to convert your key
.py
files in.pyc
, C compiled files, like.dll
in Windows and.so
in linux, much harder to revert than common.pyo
and.pyc
files (and also gain in performance!)And a third option is
cx_Freeze
, which is cross-platform.