Convert Python File to EXE
Last updated
Last updated
In this article, you will learn how you can convert .py file to .exe file. Follow the below steps for the same.
Step 1: Install the library pyinstaller.Type below command in the command prompt.
Step 2: Go into the directory where your â.pyâ file is located.
Step 3:Press shift⧠button and simultaneously right click at the same location. You will get below box.
You will get a window shown below.
Step 5:Type the command given below in that PowerShell window.
My â.pyâ file name is â1â.See below:
In case you get an error at this point in the PowerShell window like this:The correction while typing the above command:
The correction while typing the above command:
Step 6:After typing the command âHit the Enterâ.It will take some time to finish the process depending on the size of the file and how big is your project.After the processing has been finished, the window will look as below:
Step 7: See the directory it should look like this:
âbuildâ folder and â1.specâ is of no use. You can delete these if you want, it will not affect your â.exeâ file.
Step 8:Open âdistâ folder above. Here you will get your â.exeâ file.
Right-click on the file and check the properties.
Stay Tuned!Previously published at http://gajeshsnaik.codes/convert-python-to-exe/
Reference : https://hackernoon.com/how-to-convert-python-file-to-exe-r2ac3yqp
Step 4:Click on âOpen PowerShell window hereâ.