473,322 Members | 1,421 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,322 software developers and data experts.

Easy way to make EXEs...

Okay, I am completely new to Python, and I really dont understand much, but
I was wondering how to make a python script/program into a standalone .EXE?
I dont understand py2exe at all, so if someone could tell me or find me an
easy (For a newbie) to convert Python scripts to EXEs, please let me know!

Thanks for any help!
Jul 18 '05 #1
8 1767
Hello Xero,
Okay, I am completely new to Python, and I really dont understand much, but
I was wondering how to make a python script/program into a standalone .EXE?
I dont understand py2exe at all, so if someone could tell me or find me an
easy (For a newbie) to convert Python scripts to EXEs, please let me know!

Do try and read the FAQ.
http://www.python.org/doc/faq/progra...-python-script

HTH.
Miki
Jul 18 '05 #2
Xero Limit 126 wrote:

Okay, I am completely new to Python, and I really dont understand much, but
I was wondering how to make a python script/program into a standalone .EXE?
I dont understand py2exe at all, so if someone could tell me or find me an
easy (For a newbie) to convert Python scripts to EXEs, please let me know!


What don't you understand about py2exe? How it works, or how to actually
execute it? Or something else? If you have trouble with it, perhaps there
could be some improvements in the documentation... but nobody will know
unless you help us figure out what the problem is.

-Peter
Jul 18 '05 #3
"What don't you understand about py2exe? How it works, or how to actually
execute it? Or something else? If you have trouble with it, perhaps there
could be some improvements in the documentation... but nobody will know
unless you help us figure out what the problem is.

-Peter"
Okay, I created the following setup file:

--- file setup.py
from distutils.core import setup
import py2exe

setup(
console = ["calculator1.py"],
)

Then, I get the following error:

-------------------------------
Traceback (most recent call last):
File "C:/WINDOWS/Desktop/Programming/Python/Programs/setup", line 4, in ?
setup(
File "C:\WINDOWS\DESKTOP\PROGRAMMING\PYTHON\BASE\lib\di stutils\core.py",
line 137, in setup
raise SystemExit, gen_usage(dist.script_name) + "\nerror: %s" % msg
SystemExit: usage: setup [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts]
....]
or: setup --help [cmd1 cmd2 ...]
or: setup --help-commands
or: setup cmd --help

error: no commands supplied
--------------------------

I also get a pop up window to the effect "Do you want to exit all together,
Yes/No"...

I have a feeling that Im just inputing somthing incorectly, or I have
somthing installed incorrectly...

(Sorry for not going too indepth before)
Jul 18 '05 #4
Xero Limit 126 wrote:
....
SystemExit: usage: setup [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts]
...]
or: setup --help [cmd1 cmd2 ...]
or: setup --help-commands
or: setup cmd --help

error: no commands supplied
--------------------------

setup.py requires that you specify which command, such as "install",
"bdist_wininst", or in your case "py2exe" you want to run. Distutils
(the source of the setup.py functionality) is a large package with many
operations beyond creating an exe. Try:

python setup.py py2exe

And see if that gets you farther.

Good luck,
Mike

_______________________________________
Mike C. Fletcher
Designer, VR Plumber, Coder
http://members.rogers.com/mcfletch/

Jul 18 '05 #5

"Xero Limit 126" <xe**********@earthlink.net> wrote in message
news:NM******************@newsread1.news.atl.earth link.net...
Okay, I am completely new to Python, and I really dont understand much, but I was wondering how to make a python script/program into a standalone ..EXE? I dont understand py2exe at all, so if someone could tell me or find me an
easy (For a newbie) to convert Python scripts to EXEs, please let me know!

Thanks for any help!

You should have no trouble with py2exe at all. A simple setup script would
be:

#setup.py
from distutils.core import setup
import py2exe

setup(name="myfile.py",
scripts=["myfile.py"],
)

Then to compile that file, go to the command prompt and switch to the
directory that the file is in. For example on my machine I would do the
following:

Microsoft Windows XP [Version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.

C:\Documents and Settings\Lucas Raab>cd C:\Python23

C:\Python23>python setup.py py2exe

Wait a few moments for py2exe to compile your script and Voilla!! you have
an executable.
Jul 18 '05 #6

"Xero Limit 126" <xe**********@earthlink.net> wrote in message
news:yz****************@newsread1.news.atl.earthli nk.net...
"What don't you understand about py2exe? How it works, or how to actually
execute it? Or something else? If you have trouble with it, perhaps there could be some improvements in the documentation... but nobody will know
unless you help us figure out what the problem is.

-Peter"
Okay, I created the following setup file:

--- file setup.py
from distutils.core import setup
import py2exe

setup(
console = ["calculator1.py"],
)

Then, I get the following error:

-------------------------------
Traceback (most recent call last):
File "C:/WINDOWS/Desktop/Programming/Python/Programs/setup", line 4, in ? setup(
File "C:\WINDOWS\DESKTOP\PROGRAMMING\PYTHON\BASE\lib\di stutils\core.py",
line 137, in setup
raise SystemExit, gen_usage(dist.script_name) + "\nerror: %s" % msg
SystemExit: usage: setup [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts]
...]
or: setup --help [cmd1 cmd2 ...]
or: setup --help-commands
or: setup cmd --help

error: no commands supplied
--------------------------

I also get a pop up window to the effect "Do you want to exit all together, Yes/No"...

I have a feeling that Im just inputing somthing incorectly, or I have
somthing installed incorrectly...

(Sorry for not going too indepth before)

I believe you have to go to the command prompt or whatever you're using, go
to the directory where the file is located, and type (not the quotation
marks): "python setup.py py2exe"
Jul 18 '05 #7
Voila! Yeah!
Thank You, Lucas!

Newbs appreciate people like you.
We have to search Google for hours to find a post that will put it on our level.
I can't tell you how much I appreciate the step-by-step.
Now I understand the process and the syntax.
Gracias!!!!
Grazie !!!
Thx.!!!



"Lucas Raab" <py*********@hotmail.com> wrote in message news:<X8****************@newsread1.news.atl.earthl ink.net>...
"Xero Limit 126" <xe**********@earthlink.net> wrote in message
news:NM******************@newsread1.news.atl.earth link.net...
Okay, I am completely new to Python, and I really dont understand much,

but
I was wondering how to make a python script/program into a standalone

.EXE?
I dont understand py2exe at all, so if someone could tell me or find me an
easy (For a newbie) to convert Python scripts to EXEs, please let me know!

Thanks for any help!

You should have no trouble with py2exe at all. A simple setup script would
be:

#setup.py
from distutils.core import setup
import py2exe

setup(name="myfile.py",
scripts=["myfile.py"],
)

Then to compile that file, go to the command prompt and switch to the
directory that the file is in. For example on my machine I would do the
following:

Microsoft Windows XP [Version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.

C:\Documents and Settings\Lucas Raab>cd C:\Python23

C:\Python23>python setup.py py2exe

Wait a few moments for py2exe to compile your script and Voilla!! you have
an executable.

Jul 18 '05 #8
I also find it convenient to add the following lines to setup.py
(found in a sample somewhere):

if len(sys.argv) == 1:
sys.argv.append("py2exe")

That way you can simply double-click on setup.py to create an
executable.

Gerhard

On 13 Feb 2004 19:14:24 -0800, bi********@msn.com (Bill Ludden) wrote:
Voila! Yeah!
Thank You, Lucas!

Newbs appreciate people like you.
We have to search Google for hours to find a post that will put it on our level.
I can't tell you how much I appreciate the step-by-step.
Now I understand the process and the syntax.
Gracias!!!!
Grazie !!!
Thx.!!!



"Lucas Raab" <py*********@hotmail.com> wrote in message news:<X8****************@newsread1.news.atl.earthl ink.net>...
"Xero Limit 126" <xe**********@earthlink.net> wrote in message
news:NM******************@newsread1.news.atl.earth link.net...
> Okay, I am completely new to Python, and I really dont understand much,

but
> I was wondering how to make a python script/program into a standalone

.EXE?
> I dont understand py2exe at all, so if someone could tell me or find me an
> easy (For a newbie) to convert Python scripts to EXEs, please let me know!
>
> Thanks for any help!
>
>

You should have no trouble with py2exe at all. A simple setup script would
be:

#setup.py
from distutils.core import setup
import py2exe

setup(name="myfile.py",
scripts=["myfile.py"],
)

Then to compile that file, go to the command prompt and switch to the
directory that the file is in. For example on my machine I would do the
following:

Microsoft Windows XP [Version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.

C:\Documents and Settings\Lucas Raab>cd C:\Python23

C:\Python23>python setup.py py2exe

Wait a few moments for py2exe to compile your script and Voilla!! you have
an executable.


Jul 18 '05 #9

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: Jon | last post by:
I have 3 VB.net executables that reference the same 3 VB.Net DLLs. How is the best way to distribute the EXEs without putting 3 copies of of DLL on a user's machine. I looked into Private...
1
by: James | last post by:
I'm having a problem using the System.Net.WebClient to download .exes from a web server. I'm testing everything on localhost, and the same code works fine with all other types of file. I even tried...
8
by: Dave | last post by:
This may be a simple question, but I'm new to .NET and not having much luck finding out the answer. I'm writing a Windows Service and want to develop a separate program that provides a user...
2
by: mb | last post by:
I was curious if the new .NET 2.0 has optimized things to make the EXEs run faster? Thanks
2
by: Benny | last post by:
If you rebuild a solution without change anything, the new generated EXEs still has some difference. Is there a way to find out whether two EXEs are functional same?
1
by: pavanip | last post by:
Hi, I have one windows application in that i created multiple exes.Now I am trying to build my application and combine multiple exes to one exe.But i am unable to that can you tell me the...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.