![]() Double click on the file, and it should open up a browser on the Amazon product page, check the price then send myself an email & a WhatsApp msg. Now we have this executable file, let’s run it to test. Otherwise, the final executable file will be missing libraries, and will not run. If you are using auto-py-to-exe inside a virtual environment, make sure to install all libraries required by your script. With the above steps, we are ready to convert our Python script into an executable file. I use this free site to convert pictures (.jpg or. ![]() Go to the Icon section, I’m going to select the icon file for this application. I usually prefer to have a custom icon for my application, so let’s add that. # include the appropriate folder address for chromedriver.exeĭriver_path = file_path(r'chromedriver.exe')ĭriver = webdriver.Chrome(driver_path, options=opt) Step 5. Return os.path.join(base_path, relative_path) We are going to create a function to include the appropriate folder for our added files. pyinstaller -F filename.py( if everything to be bundled into one folder. pyinstaller -w filename.py( if no command prompt needs to be opened when filename.exe file is ran.) 4. pyinstaller filename.py( Go to dist folder.) 3. Therefore, we have to instruct our code to pickup the files from the right place. To create a Executable file in Python you need to install following command. Pyinstaller unpacks the data/files into a temporary folder called sys._MEIPASS. We need to tweak our code a little bit, otherwise the final application won’t work. When we use the “One File” together with the “Additional Files” options. In the “Additional Files” setting, we can choose to add a single file or a folder. Since our applicaiton requires the chromedriver, we’ll add it to the package as well. So it’s important to include any required files together with our application. When we give this application to another person, ideally they just double click it and the program runs.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |