#Convert .py to .exe don't use python ver 3.9 will not work recomment 3.8:
pip install pyinstaller
#to convert to a simple exe file the exe file will be in your dist folder
pyinstaller 'fileName.py'
#to convert to a onefile exe file the exe file will be in your dist folder
pyinstaller --onefile 'fileName.py'
to convert to a onefile exe file and the python window will not appear
pyinstaller -w --onefile 'fileName.py'
# plz suscribe to my youtube channel -->
# https://www.youtube.com/channel/UC-sfqidn2fKZslHWnm5qe-A
#first install pyinstaller using
#pip install pyinstaller
#open your cmd
#first change the directory by using
cd The_path_of_your_code in control panel
#then write simple command given below
pyinstaller --onefile your_script_name.py
#now the file will have its exe file in short period of time
pip install -U pyinstaller
# Open a command prompt/shell window
# Navigate to the directory where your .py file is located
# then build your app with the following command:
pyinstaller --onefile your_program.py
#If You are Using Mac Install Wine And Download The Windows Command Line
#In windows Press Windows Key + R Key
#Type In Cmd
#Then Type The Commands Below
pip install pyinstaller
cd YourFilepath
pyinstaller Nameoffile.py --onefile -w
how to convert .py into .exe through pytohn scripts
Install Python 3.6.
Install cx_Freeze, (open your command prompt and type pip install cx_Freeze.
Install idna, (open your command prompt and type pip install idna.
Write a .py program named myfirstprog.py.
Create a new python file named setup.py on the current directory of your script.
In the setup.py file, copy the code below and save it.
With shift pressed right click on the same directory, so you are able to open a command prompt window. In the prompt, type python setup.py build If your script is error free, then there will be no problem on creating application.
Check the newly created folder build. It has another folder in it.
Within that folder you can find your application.
Run it.
Make yourself happy.