Python Forum
Is there anyway to make a .py file into a .exe file?
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Is there anyway to make a .py file into a .exe file?
#1
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?
Reply
#2
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/
Oshadha likes this post
Reply
#3
(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.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  file open "file not found error" shanoger 8 1,071 Dec-14-2023, 08:03 AM
Last Post: shanoger
  Need to replace a string with a file (HTML file) tester_V 1 752 Aug-30-2023, 03:42 AM
Last Post: Larz60+
  How can I change the uuid name of a file to his original file? MaddoxMB 2 917 Jul-17-2023, 10:15 PM
Last Post: Pedroski55
  Reading data from excel file –> process it >>then write to another excel output file Jennifer_Jone 0 1,087 Mar-14-2023, 07:59 PM
Last Post: Jennifer_Jone
Thumbs Up Need to compare the Excel file name with a directory text file. veeran1991 1 1,107 Dec-15-2022, 04:32 PM
Last Post: Larz60+
Photo Making Zip file of a file and Directory Nasir 2 1,013 Oct-07-2022, 02:01 PM
Last Post: Nasir
  Need Help: Convert .pcl file to .pdf file ManuRaval 6 2,531 Sep-13-2022, 01:31 PM
Last Post: ManuRaval
  filter every 24 days file (considering file name) RolanRoll 5 2,203 Jun-23-2022, 11:41 AM
Last Post: RolanRoll
  Modify values in XML file by data from text file (without parsing) Paqqno 2 1,644 Apr-13-2022, 06:02 AM
Last Post: Paqqno
  How to split file by same values from column from imported CSV file? Paqqno 5 2,766 Mar-24-2022, 05:25 PM
Last Post: Paqqno

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020