By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,584 Members | 1,667 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,584 IT Pros & Developers. It's quick & easy.

py2exe - create one EXE

P: n/a
Hi,
Is there a way to create one .exe using py2exe (or some other
extension/utility that can do it)?

Basically i want to generate one .exe that contains everything my
python app needs to run instead of having a .exe, some .zips, etc.

thanks

Jul 19 '05 #1
Share this Question
Share on Google+
9 Replies


P: n/a
"codecraig" wrote:
Is there a way to create one .exe using py2exe (or some other
extension/utility that can do it)?

Basically i want to generate one .exe that contains everything my
python app needs to run instead of having a .exe, some .zips, etc.


hmm. if you cannot access google, how come you're able to post via
google groups?

here's the first google hit for "py2exe single exe"

http://starship.python.net/crew/thel...FileExecutable

(that page also happens to be linked from the front page on the py2exe
support wiki)

</F>

Jul 19 '05 #2

P: n/a
must have missed it on py2exe front page....and for google i didnt try
that search exactly. Thanks though. I was trying like "one executable
py2exe", etc.

Jul 19 '05 #3

P: n/a
yeah, the question does come up once a month at least, but you could
try mcmillan installer with it's --onefile option.

i have mirrors at http://www.the-jedi.co.uk/downloads/installer

Jul 19 '05 #4

P: n/a
I tried the installer v6...and i generated a spec, and i built the
exe...when i run the exe i get a error popup window from Windows asking
me to send an Error report.

The warnings that were generated during the build all appear to be
"ignorable" as the documentation mentions.

any ideas?

Jul 19 '05 #5

P: n/a
oh and Fredrik, i tried the SingleInstaller link....which points to a
script using NSIS. I followed those instructions which generated an
..exe. HOwever, when i run the .exe nothing happens (meaning no
process starts, no output, no errors, nothing).

any ideas on that? have ever used it?

Jul 19 '05 #6

P: n/a
I like that you can automatically invoke NSIS and create an installer,
but I thought the question was how can all of the libraries be in a
single runnable program executable (not a program that installs, but
the program that you wrote.)

I don't think you can do this, because (unless you have your own
version of python that statically links with all of the module's
native code that you need) you would have to have some code that loads
DLLs that are packed in your executable at the moment that the import
happens for that module.

Please correct me if I'm wrong, I'd love to minimize the files that
have to be in the same directory as my executable (or nearby, or in a
common lib dir.)

(sorry you got this twice Craig.)

-Jim
Jul 19 '05 #7

P: n/a
So how there is currently available way to have 1 .exe which includes
everything needed to run a python app?

:sigh:

Jul 19 '05 #8

P: n/a
James Carrol wrote:
I like that you can automatically invoke NSIS and create an installer,
but I thought the question was how can all of the libraries be in a
single runnable program executable (not a program that installs, but
the program that you wrote.)
the wiki recipe does exactly that -- it creates one EXE, which *temporarily*
unpacks the components that have be in separate files for Windows to find
them. when you terminate the program, the files are removed.
I don't think you can do this, because (unless you have your own
version of python that statically links with all of the module's
native code that you need) you would have to have some code that loads
DLLs that are packed in your executable at the moment that the import
happens for that module.


there are commerical libraries available that overrides Win32 API calls
so they fetch data from resources rather than disk files. but given that
disks are fast and disk space is cheap, it's hardly worth the effort.

</F>

Jul 19 '05 #9

P: n/a
fredrik...

any ideas on my last post? (copied below for u)

oh and Fredrik, i tried the SingleInstaller link....which points to a
script using NSIS. I followed those instructions which generated an
..exe. HOwever, when i run the .exe nothing happens (meaning no
process starts, no output, no errors, nothing).

any ideas on that? have ever used it?

thanks

Jul 19 '05 #10

This discussion thread is closed

Replies have been disabled for this discussion.