


It changes the name of your executable file.įor eg- pyinstaller path_to_your_script.py –name customname PyInstaller comes with lots of options for customizing your build, some of the commonly used options are: Similarly, we can add data and binaries to include a missing image file, ini file, or binaries in it. For eg- if you want to add pandas then you would specify that as. But we can edit the spec file and specify the missing details in it. Sometimes it fails because pyinstaller fails to bundle a required file, like missing imports, missing data files/binaries. If it fails to run, you can check the errors on the command line that indicate what is wrong. When it finishes, a subfolder with the default name dist will appear in the project directory which has a. The first time you run pyinstaller command in your project directory, it will generate a spec file with some default values filled in it.įinally, pyInstaller tries to create an executable from the application, bundling it with all its dependencies. spec, this file contains details of how your python program should be packaged. The user can launch the integrated application without having to install a Python interpreter or other modules.Īfter analyzing code and learning how to use all libraries and modules, pyinstaller then generates a “spec file”. PyInstaller reads your Python program, analyzes all the imports it makes, and binds copies of those to the program. You can install it through pip using this command:
