Making an exe from a python script

+1 Steve Medley · March 1, 2015
Anyway to turn these python scripts I'm learning in the tutorials into an exe through PyCharm? I searched google and only found py2exe which I can't figure out at all.

Post a Reply

Replies

- page 2
Oldest  Newest  Rating
+1 alex constantin · March 1, 2015
For py2exe, do this:
In the same directory as your main script file, make a setup.py file and write this:

from distutils.core import setup
import py2exe

setup(console=['main.py']) #replace main.py for whatever is your main script

Then, in command prompt, type in: cd REPLACEFORDIRECTORY
When you are in the setup.py directory, type this in in command prompt: 
python setup.py py2exe


Then it will start building the program and will create two new directories, build and dist. Go into dist, and you should have the exe application. Good luck
  • 1
  • 2

Python

107,222 followers
About

This section is all about snakes! Just kidding.

Links
Moderators
Bucky Roberts Administrator