Here are resources and additional documentation about PyInstaller:
Packaging With PyInstaller
00:32 Here, you’ll use PyInstaller to convert the image viewer application that you created earlier into an executable. You can see the command onscreen, and when you run this, you’ll see a lot of output similar to the following.
There will be a lot of other files in the
dist/ folder that the executable uses. If you prefer to have only a single executable file, then you can rerun the command using the
--onefile flag as seen here onscreen.
This will still generate the
dist/ folder, but this time there should be just a single executable in it. Note that Windows Defender may flag your executable as having a virus if you use the
--onefile flag. If it does, then you’ll need to add an exclusion to Windows Security to get it to run.
This is because Windows executables need to be signed in Windows 10. When you run the executable, you’ll see a console window appear in addition to your user interface. To remove the console, you can use the
--noconsole or the
--windowed flag when running PyInstaller.
Become a Member to join the conversation.