1pip install pyinstaller
2
3cd FullPathOfFile in cmd console
4pyinstaller --onefile pythonScriptName.py
5# a .exe file is created in the FullPathOfFile\dist
1Hold shift and right click where your python file is located
2and then type
3
4pyinstaller 'fileName.py'
5to convert to a simple exe file the exe file will be in your dist folder
6
7pyinstaller --onefile 'fileName.py'
8to convert to a onefile exe file the exe file will be in your dist folder
9
10pyinstaller -w --onefile 'fileName.py'
11to convert to a onefile exe file and the python window will not appear
12
13# {(NOTE: DON'T DO THIS IF YOU PROGRAM IS CONSOLE BASED)}
14# {(IF YOU HAVE MADE A GAME USING PYGAME OR USING ANYTHING ELSE
15# WHERE CONSOLE IS NOT USED THEN IT'S FINE)}
16# For more help you can click the link bellow
17# It's 12 min tutorial of codewithharry
1# for windows only, connot say for other operating systems
2open command prompt
3 type "pip install pyinstaller"
4# let it install
5after it is installed
6 locate to the file in cmd(command prompt) using cd
7 for example : cd /folder/location
8after you are in that folder type:
9 pyinstaller file_name.py --onefile -w
10# in place of file_name.py type the file's name you want to convert.
11now pyinstaller will give you different type of files
12 to locate the .exe file you want go into the folder,
13 then go into dist folder and you will find it.
14now you are done! BOYAAH !!
15@important note -> if this gives you an error then you need to use py2exe module
16# Author Rudra the great
1put this in a .bat file or just run it in CMD
2
3pyinstaller --onefile file_name.py
1# Pip install
2$ pip install auto-py-to-exe
3$ auto-py-to-exe
4
5# clone install
6$ git clone https://github.com/brentvollebregt/auto-py-to-exe.git
7$ python -m pip install -r requirements.txt
8$ cd auto-py-to-exe
9$ python setup.py install
10
11$ auto-py-to-exe
1print("what is ur monthly salary")
2salary= int( input() )
3asalary= salary * 12
4dsalary= salary/30
5hsalary=salary/160
6print("hourly salary",hsalary)
7print("daily salary",dsalary)
8print("monthly aslary",salary)
9print("anual salary", asalary)
10input()