Reputation: 137
I've a simple python script that I want to see it as an exe file so I can run it in any computer.
My friend told me about py2exe. But, when I searched it, I found that it's limited to python 2.X . I wrote my script in 3.X python (3.4 , the last realese till the moment).
I wonder, How can I convert 3.x python scripts into excutable exe files?
Any sugesstions?
Upvotes: 1
Views: 917
Reputation: 33
Try using the "pyinstaller" module. The steps below will tell you how to install and use it:
Get the command prompt up and ready
Install the pyinstaller module (write this in the command prompt):
pip install pyinstaller
Change the directory to the folder that has the Python script(write in cmd too):
cd The\directory\of\your\code
Convert the file(still in the cmd)
pyinstaller --onefile nameOfYourScript.py
The EXE file will be in the dist folder
PLEASE NOTE: You must have Python added to path otherwise this won't work.
Upvotes: 1