py2exe problem - need wsvc6?

T

Tim Axtelle

I am new to Python and am trying to create a standalone exe from a
python script using py2exe 0.5.0 and Python 2.3 without success. I am
able to generate the appropriate .exe file but it is not executable.
Running it does absolutely nothing.

The sourceforge site says that wsvc6 is required for py2exe. Is this
true? If so, it is contradiction with the python faq which claims
that no C compiler is necessary with py2exe.

I also tried Gordon Mcmillan's installer which I found completely
incomprehensible despite the prodigous "easy to use" claims.

Please help this obviously flustered newbie. Thanks in advance.
 
A

Aaron

You do not need a C compiler to make a standalone application.
In version 0.5 the setup.py files changed a bit.

First of all can you run your python script on the commandline?

I have a hello world app as follows:

#pTest.py
print "Hello World"

#setup.py
from distutils.core import setup
import py2exe
setup(name='Test',
description="a Test",
version='0.1.0',
console=['pTest.py'])


#build.bat
e:\Python23\python.exe setup.py py2exe

Try to build this app and see if your py2exe is setup correctly.

-Aaron
http://metrony.com
 
A

Aaron

You do not need a C compiler to make a standalone application.
In version 0.5 the setup.py files changed a bit.

First of all can you run your python script on the commandline?

I have a hello world app as follows:

#pTest.py
print "Hello World"

#setup.py
from distutils.core import setup
import py2exe
setup(name='Test',
description="a Test",
version='0.1.0',
console=['pTest.py'])


#build.bat
e:\Python23\python.exe setup.py py2exe

Try to build this app and see if your py2exe is setup correctly.

-Aaron
http://metrony.com
 
A

Aaron

You do not need a C compiler to make a standalone application.
In version 0.5 the setup.py files changed a bit.

First of all can you run your python script on the commandline?

I have a hello world app as follows:

#pTest.py
print "Hello World"

#setup.py
from distutils.core import setup
import py2exe
setup(name='Test',
description="a Test",
version='0.1.0',
console=['pTest.py'])


#build.bat
e:\Python23\python.exe setup.py py2exe

Try to build this app and see if your py2exe is setup correctly.

-Aaron
http://metrony.com
 
E

Elder

It just opens a window which immediately closes.

Thanks for your help.


Aaron said:
You do not need a C compiler to make a standalone application.
In version 0.5 the setup.py files changed a bit.

First of all can you run your python script on the commandline?

I have a hello world app as follows:

#pTest.py
print "Hello World"

#setup.py
from distutils.core import setup
import py2exe
setup(name='Test',
description="a Test",
version='0.1.0',
console=['pTest.py'])


#build.bat
e:\Python23\python.exe setup.py py2exe

Try to build this app and see if your py2exe is setup correctly.

-Aaron
http://metrony.com

Tim said:
I am new to Python and am trying to create a standalone exe from a
python script using py2exe 0.5.0 and Python 2.3 without success. I am
able to generate the appropriate .exe file but it is not executable.
Running it does absolutely nothing.

The sourceforge site says that wsvc6 is required for py2exe. Is this
true? If so, it is contradiction with the python faq which claims
that no C compiler is necessary with py2exe.

I also tried Gordon Mcmillan's installer which I found completely
incomprehensible despite the prodigous "easy to use" claims.

Please help this obviously flustered newbie. Thanks in advance.
 
T

Thomas Heller

MSVC6 is *only* required if you want to build py2exe itself from the
sources. If you install the binary package, you won't need it. More
below.
In version 0.5 the setup.py files changed a bit.

First of all can you run your python script on the commandline?

I have a hello world app as follows:

#pTest.py
print "Hello World"

#setup.py
from distutils.core import setup
import py2exe
setup(name='Test',
description="a Test",
version='0.1.0',
console=['pTest.py'])


#build.bat
e:\Python23\python.exe setup.py py2exe

Try to build this app and see if your py2exe is setup correctly.

Elder said:
It just opens a window which immediately closes.

What did you expect ;-) ? The exe is a console program, when you
double-click it in the explorer, it opens a console ("command prompt")
window, prints 'Hello, World', and then the console window closes again
- probably faster then you can recognize the output.

To see what this program does, you should open a command prompt window
yourself, navigate (with 'cd directory') to the directory where your exe
file is, and start it by entering 'pTest.exe'.

You can prevent that the console window in the first case closes
immediately by adding a 'raw_input()' call to the script pTest.py at the
end.

Thomas
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,183
Messages
2,570,966
Members
47,516
Latest member
ChrisHibbs

Latest Threads

Top