PyInstaller bundles a Python application and all its dependencies into a single package. The user can run the packaged app without installing a Python interpreter or any modules.
pip install PyInstaller
Works out-of-the-box with any Python version 2.7 / 3.4-3.7.
Fully multi-platform, and uses the OS support to load the dynamic libraries, thus ensuring full compatibility.
Correctly bundles the major Python packages such as numpy, PyQt4, PyQt5, PySide, Django, wxPython, matplotlib and others out-of-the-box.
Compatible with many 3rd-party packages out-of-the-box. (All the required tricks to make external packages work are already integrated.)
Libraries like PyQt5, PyQt4, PySide, wxPython, matplotlib or Django are fully supported, without having to handle plugins or external data files manually.
Working code signing on OS X.
Bundles MS Visual C++ DLLs on Windows.
Syntax : pyinstaller <options> <ScriptName.py>
-D, --onedir : Create a one-folder bundle containing an executable (default)
-F, --onefile : Create a one-file bundled executable.
--specpathDIR : Folder to store the generated spec file (default: current directory)
pyinstaller myscript.py
pyinstaller --onefile myscript.py