1pip install pyinstaller
2
3cd PathOfFile
4
5pyinstaller --onefile -w ScriptName.py
6
7(note that if you are using -w then your python file has to be an application and the file will be inside the "dist" folder)
1pip install pyinstaller
2
3cd FullPathOfFile in cmd console
4pyinstaller --onefile pythonScriptName.py
5# a .exe file is created in the FullPathOfFile\dist
1#first install pyinstaller using
2#pip install pyinstaller
3#open your cmd
4#first change the directory by using
5cd The_path_of_your_code in control panel
6#then write simple command given below
7pyinstaller --onefile your_script_name.py
8#now the file will have its exe file in short period of time
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