Step 1

Open Command Prompt as an administrator and type:
pip install pyinstaller
pip install --upgrade pyinstaller

Press the enter key. Close Command Prompt.

Step 2

Open File Explorer and navigate to your python file. Click in the file location bar and type “cmd”. Press the enter key. Command prompt will open. Type:

pyinstaller --onefile yourfilename.py

Replace yourfilename.py with your python file’s name. Press the enter key. Your file will be yourfilename.exe in the “dist” folder. You can delete the other folders.

Congrats on creating a Python .exe file!