Python File to Executable File

pip install pyinstaller
pyinstaller 
pyinstaller --version
  1. Create a python file. Open Command prompt and run python file to check whether the code runs successfully without any error.
  2. Create an exe file.
  • Go to the folder where the .py file is saved. Open the command prompt in that folder.
pyinstaller file_name.py
pyinstaller --onefile file_name.py
pyinstaller -F -w -i "icon_file.ico" file_name.py
pyinstaller -F -w -i "kingbondl.ico" flappy.py

Conclusion:

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store