Convert py to exe - from code to software

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hi everybody today i will show you how to convert python files into executable programs now i'll be using my pi qd5 trivia game just as an example but you guys feel free to use your own gui applications instead and while there's actually a few ways of doing this in this tutorial we will only focus on auto pi to exe because that's my favorite one and let's begin by installing it we will open our terminal in my case anaconda it will activate our working environment then we will pip install auto pi to exe and once we have it installed we can run it with auto pi to exe we will begin by selecting the main file of our project in the case of my trivia app this would be programmer.py next we can either choose to save our app as a single file or we can go for the one directory option in my case i don't really have a choice because my app consists of several files i have two different logo files and i have a single functions.py file in addition to the main project file that's why i would have to go for one directory but if your app consists of a single python file without any logos without any additional documents definitely go for the one file option next we can either choose to display our console or we can choose to hide it now in the case of my trivia app if you guys remember i am printing all the correct answers to the console that's why for me it makes much more sense to hide the console just so our users cannot cheat otherwise it's gonna be a very boring trivia game when you know all the answers in advance next we will generate an icon for our application now if you guys are looking for a good example to icons you can find them at this sidebar all these lovely logos are actually icons and we would like our app to have something similar now i personally find that the easiest way to generate ico files is to first design them as png images for an example this would be the image that i designed for my trivia game and you can do this easily with paint with inkscape with photoshop illustrator almost all the graphics software at least the ones i know are able to generate png files and then once we're happy with the file we designed we will simply navigate to convert ico.com we will drag and drop our png icon right over here and we will click on the white arrow and then we can save our icon at an s strategic spot on our computer i usually paste it directly in the project files then we will click on browse and we will select the same ico file that we just downloaded and now it's time to add the rest of our project files in the additional files section i will click on add files and for my project i'm going to select both of my logos as well as functions.py and i will hit open and since my application is quite simple i don't have any folders to organize my data i will not use the add folder option however if your application is much more complex if you have all sorts of folders in there definitely use it okay next we will actually skip the advanced section because we mostly need it when things go wrong so if there are any issues with your conversion this section will be your best friend because this is where all the debugging happens this is where you can import all sorts of modules that you didn't have access to before your conversion failed okay so let's just minimize it lastly inside the settings section we will select the output folder which is where we would like to save our program in my case i'm going to select the desktop and now we are ready to convert our application by clicking on convert pi to exe and once the conversion is complete we will open the output folder where we can see a brand new folder called programmer which we will click and we will look for programmer.exe which is quite easy to find because that's the only black icon we have in the bunch so let's go ahead and run our trivia game okay let's give it a shot ah almost you guys i was so so close so it appears that i am only 90 percent programmer which is kind of sad because i memorized most of the answers during the testing stage of the app but that's okay we only wanted to check if this program works or if it doesn't work and it seems to work so that's awesome and now that we've turned our humble python code into a full-blown desktop software we can easily share it with our friends and with our family who know nothing about github and nothing about python but still want to use our projects awesome so now you guys know exactly how to convert your python projects to fully functional programs good job if you guys found this video helpful please leave me a like a comment maybe subscribe to my channel or share this video with your friends because that way you're helping me too now thank you so much for watching and i will see you very very soon
Info
Channel: Python Simplified
Views: 158,235
Rating: 4.911572 out of 5
Keywords: python, python programming, python gui, gui, graphic user interface, user interface, convert py to exe, converty python to exe, convert python to executable, executable, exe, .exe, convert .py to .exe, auto py to exe, auto-py-to-exe, icons, icon, generate icons, convert png to ico, .png to .ico, create ico, create .ico, create icon, from code to software, python file to app, application, gui app, gui application, python app, python application, python app icon, software, program
Id: Y0HN9tdLuJo
Channel Id: undefined
Length: 5min 54sec (354 seconds)
Published: Thu May 06 2021
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.