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. There are some Python packaging programs, such as the excellent PyInstaller that will package up the python interpreter, the run-time libraries and other stuff your program needs into a single directory, but I'm not aware of any on-line version of this. With the above steps, we are ready to convert our Python script into an executable file. There are no programs that will convert a Python program into a simple EXE 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. Therefore, we have to instruct our code to pickup the files from the right place. 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 |