There are at least three ways.
1. PyInstaller ("pip install pyinstaller" or "pip3 install pyinstaller" depending on whether you use python2 or 3) but there is a known risk that MS windows suggests that the exe file contains virus.
2. auto-py-to-exe (install with pip) that compiles and uses pyinstaller via a graphical interface. Mostly works well.
3. Py2exe, which I have never used. Maybe someone else can fill in the blanks here
Edit:
Found a web page: https://www.datasciencelearner.com/how-t...on-to-exe/
1. PyInstaller ("pip install pyinstaller" or "pip3 install pyinstaller" depending on whether you use python2 or 3) but there is a known risk that MS windows suggests that the exe file contains virus.
2. auto-py-to-exe (install with pip) that compiles and uses pyinstaller via a graphical interface. Mostly works well.
3. Py2exe, which I have never used. Maybe someone else can fill in the blanks here
Edit:
Found a web page: https://www.datasciencelearner.com/how-t...on-to-exe/