py2exe problem - need wsvc6?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Tim Axtelle

    py2exe problem - need wsvc6?

    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
    incomprehensibl e despite the prodigous "easy to use" claims.

    Please help this obviously flustered newbie. Thanks in advance.
  • Aaron

    #2
    Re: py2exe problem - need wsvc6?

    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='Tes t',
    description="a Test",
    version='0.1.0' ,
    console=['pTest.py'])


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

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

    -Aaron


    Tim Axtelle wrote:
    [color=blue]
    > 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
    > incomprehensibl e despite the prodigous "easy to use" claims.
    >
    > Please help this obviously flustered newbie. Thanks in advance.[/color]

    Comment

    • Aaron

      #3
      Re: py2exe problem - need wsvc6?

      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='Tes t',
      description="a Test",
      version='0.1.0' ,
      console=['pTest.py'])


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

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

      -Aaron


      Tim Axtelle wrote:
      [color=blue]
      > 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
      > incomprehensibl e despite the prodigous "easy to use" claims.
      >
      > Please help this obviously flustered newbie. Thanks in advance.[/color]

      Comment

      • Aaron

        #4
        Re: py2exe problem - need wsvc6?

        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='Tes t',
        description="a Test",
        version='0.1.0' ,
        console=['pTest.py'])


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

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

        -Aaron


        Tim Axtelle wrote:
        [color=blue]
        > 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
        > incomprehensibl e despite the prodigous "easy to use" claims.
        >
        > Please help this obviously flustered newbie. Thanks in advance.[/color]

        Comment

        • Elder

          #5
          Re: py2exe problem - need wsvc6?

          It just opens a window which immediately closes.

          Thanks for your help.


          "Aaron" <aaron@metrony. com> wrote in message
          news:40357A5B.5 090701@metrony. com...[color=blue]
          > 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='Tes t',
          > description="a Test",
          > version='0.1.0' ,
          > console=['pTest.py'])
          >
          >
          > #build.bat
          > e:\Python23\pyt hon.exe setup.py py2exe
          >
          > Try to build this app and see if your py2exe is setup correctly.
          >
          > -Aaron
          > http://metrony.com
          >
          > Tim Axtelle wrote:
          >[color=green]
          > > 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
          > > incomprehensibl e despite the prodigous "easy to use" claims.
          > >
          > > Please help this obviously flustered newbie. Thanks in advance.[/color][/color]


          Comment

          • Thomas Heller

            #6
            Re: py2exe problem - need wsvc6?

            [color=blue]
            > "Aaron" <aaron@metrony. com> wrote in message
            > news:40357A5B.5 090701@metrony. com...[color=green]
            >> You do not need a C compiler to make a standalone application.[/color][/color]

            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.
            [color=blue][color=green]
            >> 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='Tes t',
            >> description="a Test",
            >> version='0.1.0' ,
            >> console=['pTest.py'])
            >>
            >>
            >> #build.bat
            >> e:\Python23\pyt hon.exe setup.py py2exe
            >>
            >> Try to build this app and see if your py2exe is setup correctly.[/color][/color]

            "Elder" <tim@axtelle.co m> writes:
            [color=blue]
            > It just opens a window which immediately closes.[/color]

            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


            Comment

            Working...