[Tutor] Wrestling with the Py2exe Install, Win7[XP!], Py2.5

Robert Berman bermanrl at cfl.rr.com
Wed Feb 17 19:26:45 CET 2010

> -----Original Message-----
> From: tutor-bounces+bermanrl=cfl.rr.com at python.org [mailto:tutor-
> bounces+bermanrl=cfl.rr.com at python.org] On Behalf Of Wayne Watson
> Sent: Wednesday, February 17, 2010 10:48 AM
> To: *tutor python
> Subject: [Tutor] Wrestling with the Py2exe Install, Win7[XP!], Py2.5
> (This is the same msg as above, but I meant XP. I'm transitioning
> from
> XP to Win7, and am operating with two monitors and keyboards side by
> side. I thought I had used W7, but nope. Corrected wrestling it
> Subject.)
> I've finally decided to see if I could make an executable out of a
> py
> file. XP. Py2.5. I brought down the install file and proceeded with
> the
> install. I got two warning messages. Forgot the first. The second
> said,"Could not set the key value." I again used OK. I think that
> was
> the only choice. It then issued a message in a larger dialog. I've
> attached it here, but have had zero luck recently and in the past.
> It
> was about setting a key, and pointed me to a log. It mentions a
> Removepy2exe -u
> Although it finished, I have no idea where the program is. It does
> not
> show up on the Start menu All Programs List nor my desktop. What's
> up.
> I've had these messages (key) occur on other Python installs as I
> transition to Win7. So far no problem.

Hi Wayne,

A few observations as I do this on Win 7 and it does work. The first thing you
need to do is follow the tutorial that you should get at the web page found in
the README file. If not, here it is: http://www.py2exe.org/index.cgi/Tutorial

That will get you started. Now, if everything went reasonably well, you will
find two folders in the folder where you ran py2exe called build and dist.
Ignore build. In dist you will find the exe file and all the files necessary
to run your program.....gasp.....sort of. There is a caveat. Sometimes you
don't get all the necessary DLL's. If you are in that situation py2exe should
have printed the files you still need to track down and include with your

Now, I gave you all this information as background because we  all know that
really good programmers like mental and emotional pain. Well, perhaps some do.
I like the easy but good way when available.  Let me tell you what I use
because it takes a lot of the drudgery out of the process. Go to
http://code.google.com/p/gui2exe/ and download gui2exe. It will automate much
of the process and it seems to do a great job of finding all the necessary
files including the DLL's hidden from py2exe.

I hope this helps. It is a good concept and good software.

Robert Berman

More information about the Tutor mailing list