[Tutor] Py2exe (Joseph Q.)

Chad Crabtree flaxeater at yahoo.com
Wed Apr 6 03:20:22 CEST 2005


The symptoms you explain mean you don't have py2exe installed 
correctly.  Try uninstalling it and reinstalling it.


Joseph Quigley wrote:

> Joseph Q. (Uspantan, Guatemala) Using Python 2.4
>
> I downloaded py2exe and can't get it to make exe's of my python
files. 
> There are a list of instructions:
>
> # A very simple setup script to create 2 executables.
> #
> # hello.py is a simple "hello, world" type program, which alse
allows
> # to explore the environment in which the script runs.
> #
> # test_wx.py is a simple wxPython program, it will be converted
into a
> # console-less program.
> #
> # If you don't have wxPython installed, you should comment out the
> #   windows = ["test_wx.py"]
> # line below.
> #
> #
> # Run the build process by entering 'setup.py py2exe' or
> # 'python setup.py py2exe' in a console prompt.
> #
> # If everything works well, you should find a subdirectory named
'dist'
> # containing some files, among them hello.exe and test_wx.exe.
>
>
> from distutils.core import setup
> import py2exe
>
> setup(
>     # The first three parameters are not required, if at least a
>     # 'version' is given, then a versioninfo resource is built from
>     # them and added to the executables.
>     version = "0.5.0",
>     description = "py2exe sample script",
>     name = "py2exe samples",
>
>     # targets to build
>     # windows = ["test_wx.py"],
>     console = ["hello.py"],
>     )
>
> What does it mean by the 'console prompt'? I tried Command Prompt 
> (Windows XP) but I get errors when I type 'setup.py py2exe' or
'python 
> setup.py py2exe'. I also don't get anything when I run the setup.py
in 
> IDLE (or the Python command line). In fact I get an error:
> Traceback (most recent call last):
>   File
"C:\Python24\Lib\site-packages\py2exe\samples\simple\setup.py", 
> line 22, in ?
>     import py2exe
> ImportError: No module named py2exe
>
> If you have used or are using py2exe, /please/ tell me what I'm
doing 
> wrong!
> Thanks,
>   Joseph Q.
>
>------------------------------------------------------------------------
>
>_______________________________________________
>Tutor maillist  -  Tutor at python.org
>http://mail.python.org/mailman/listinfo/tutor
>  
>



		
__________________________________ 
Do you Yahoo!? 
Yahoo! Small Business - Try our new resources site!
http://smallbusiness.yahoo.com/resources/ 


More information about the Tutor mailing list