Python Forum

Full Version: Is there anyway to make a .py file into a .exe file?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I have a code in .py extension, which I need to convert into .exe extension.
If you ask why,
~
  • To make it uneditable
  • Make it more stable.

Is it good to make a.py into .exe ?

If no, why.
Is there any substitute for this?

If yes,
How?
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/
(Jan-12-2021, 08:20 PM)Serafim Wrote: [ -> ]There are at least three ways.
Nice!

(Jan-12-2021, 08:20 PM)Serafim Wrote: [ -> ]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.
Good, but I cant help Vital Information Resources Under Siege!

(Jan-12-2021, 08:20 PM)Serafim Wrote: [ -> ]2. auto-py-to-exe (install with pip) that compiles and uses pyinstaller via a graphical interface. Mostly works well.
I must try it out! Thanks Smile

(Jan-12-2021, 08:20 PM)Serafim Wrote: [ -> ]3. Py2exe, which I have never used. Maybe someone else can fill in the blanks here
Hmmm...

(Jan-12-2021, 08:20 PM)Serafim Wrote: [ -> ]Edit:
Found a web page: https://www.datasciencelearner.com/how-t...on-to-exe/
I'll try this too!

Over all, Thanks for your help.