1

I'm using py2exe to turn my python script (python 2.7.6) into an exe.

Here's my script:

name = raw_input("What is your name? ")
print "Hello " + name + "!"

It's a simple script, for testing purposes.
I'm using the following setup file:

from distutils.core import setup
import py2exe

setup(console=['hello_name.py'])

This is all straight off the py2exe website.
The problem I found here is that the exe produced is dependent upon the other files in the same folder. I'd like to produce a single .exe file which i can share with other people (like non-computer savy family members who don't have python installed).

How can I use py2exe to produce one exe file? I've seen other questions about this, but they are all too confusing/non-descript to help. I've used others which have resulted in errors.

If someone can show me a full setup.py file which will work instead of a line that would be very helpful.

jlzizmor
  • 45
  • 7
  • @g.d.d.c i tried the setup file recommended by the comment posted by minty in the question you linked to. The result was only one file, however there was an error with the following log printout: "Traceback (most recent call last): File "hello_name.py", line 1, in EOFError: EOF when reading a line" – jlzizmor May 25 '14 at 05:13
  • That full traceback will be more helpful than anything else in that case. Do you have a trailing newline in your script? – g.d.d.c May 25 '14 at 05:27
  • i do not, it is a two line script and strictly two lines – jlzizmor May 25 '14 at 05:42
  • The error you say you are getting is probably due to a syntactic mistake you have made when writing the code, but since you didn't post the full traceback nor the actual code used we cannot do much more than guessing. Try to rewrite the code and be sure of its syntax. If you still see that error then open a new question *about that error*. – Bakuriu May 25 '14 at 16:41
  • @Bakuriu what other code do you mean? All the code I have along with the full log print is there (the log is in my above comments) – jlzizmor May 26 '14 at 02:58

0 Answers0