1pip install pyinstaller
2
3cd YourFilePath
4
5pyinstaller --onefile YourFileName
1#if you dont have pyinstaller so run the cmd (winkey + r and write cmd and enter)
2#now run the command bellow
3
4 pip install pyinstaller
5
6#now run this
7
8 pyinstaller -w file_name.pyw
9 #if you want the exe to be in one file without other folders
10 #change the code to: pyinstaller -w --onefile file_name.pyw
11
12
13#change file_name to your file's name and if you aren't running the cmd in the
14#same directory so instead of the file's name write the all path
15#now you will have a directory named Build and in it you will find your exe file
16#note - if your pyw filw has dependents so they will be in the file so dont remove them
1pip install pyinstaller
2
3cd FullPathOfFile in cmd console
4pyinstaller --onefile pythonScriptName.py
5# a .exe file is created in the FullPathOfFile\dist
1Install pip using
2 pip install pyinstaller
3
4in the directory of the source code file run
5 pyinstaller <file_name>.py