![]() ![]() ![]() If PyInstaller was successfully able to generate the executable, we will see completed successfully as the last line of the output as shown below: THe most straightforward way to trigger PyInstaller is by using the following command while you're in the project's root directory. Now lets start generating the actual executable for our application. As software applications grow larger, the functionality of the application is broken down into separate Python files, and a top level Python file integrates the functionality of each of the separate files together into a single application.Īs we can see from the above diagram, the top level python file for our application is spent_driver.py. The above information is actually necessary for using PyInstaller as it needs the top level python file as its argument to create the application. spent_driver.py: This file creates a simple Command Line Interface (CLI) and imports the spent.py file and uses its functions to perform expense logging and retrieval.spent.py: This file acts as the backend of our program which creates and retrieves expense logs from the database.The two Python files function as follows: Requirements.txt contains a list of all the dependencies required by the project. We can do this by, first navigating to the project's root directory and using the following command: pip install -r requirements.txt That directory contains our 2 main Python source files:īefore going to use PyInstaller to create a standalone executable, we need to download and install all the python package dependencies. Now, it might be a bit overwhelming in the beginning to look at so many files at once, but the directory we are really interested in, is the src/. The root directory of the Expense Tracker Application is as shown below: To follow along with the article i suggest you to get the source code for the application from the link given below: ![]() This application is used to create and view a log of expense made by a person over time. ![]() To illustrate the use of the PyInstaller application, we are going to take help of a simple Python based Expense Tracker Application. In this article we are going to explore, how we can use PyInstaller to create standalone executables from our python applications. Reading time: 25 minutes | Coding time: 10 minutes ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |