FNH
FNH

Reputation: 137

How to convert python 3.X scripts into exe files?

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

Answers (2)

AngusAU293
AngusAU293

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

  1. Install the pyinstaller module (write this in the command prompt):

    pip install pyinstaller

  2. Change the directory to the folder that has the Python script(write in cmd too):

    cd The\directory\of\your\code

  3. 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

PaleNeutron
PaleNeutron

Reputation: 3215

you can try cx_Freeze!

This module supports python3.x well.

Upvotes: 3

Related Questions