PyInstaller for Python can be used to create a standalone executable from a Python script.
To create the executable, Python must be installed on the local host. Python can be obtained from here. Currently as of 2018, there is Python versions 2 and 3 available to download.
Before proceeding with the environment setup, test that the pip libraries have been installed with your Python installation with the following command in the Python interpreter:
pip
This will show the command results for the pip command. For any errors with running the pip command, pip may need to be downloaded and installed manually.
Next step is to install PyInstaller. This is done by using the following command within the Python interpreter:
pip install pyinstaller
For PyInstaller on Windows environments, PyWin32 might be required and can be found here
To test Python is running in your environment, test your Python script with the following command:
python your_script.py
Once PyInstaller has been installed, within your Python script directory, the following command can be used with your Python script to create the standalone executable:
pyinstaller --onefile
For any other issues with installing or running pip, PyInstaller or Python scripts, you may need to set up your PATH environment variables within your operating system.