Standalone Python Programs...

Discussion in 'Python' started by uri bushey, Aug 6, 2004.

  1. uri bushey

    uri bushey Guest

    I have a Python program that is built on an infrastructure of quite a
    few other programs, but I would like to create a standalone nonetheless.

    It doesn't necesarily have to be its own executable, although this is
    the most attractive option - it could just mean distributing the entire
    python distribution with it in an installer or something.

    However, here is what I have called in my python file:
    Tkinter, and multiple Pmw widgets
    WaveSurfer, called as a "Wsurf" widget, which is a great little program
    used for Spectrograms of wave files etc. It relies on Tcl/Tk and the
    SNACK library, which also have to be installed for my script to work.

    Can anyone help? I'm open to any option, py2xe, mcmillan's, or cx_freeze
    or whatever that program is, or even an installer that installs all of
    those programs.

    I'm vying for the most elegant solution.

    Thanks!

    --uri
     
    uri bushey, Aug 6, 2004
    #1
    1. Advertising

  2. uri bushey

    Larry Bates Guest

    I've found that py2exe and Inno Setup Installeer to be a good
    combination (for Windows). It isn't a single executable, but
    then what modern program is any more. It doesn't require
    distribution/installation of Python. I've used it to install
    some pretty complex combinations (wxWindows, PIL, ReportLab,
    etc.) with no problems. Inno Setup has proven to be flexible
    enough to install everything that I've done so far.

    I can't speak to Linux installations because I have always
    just used the Python installation already there.

    HTH,
    Larry Bates
    Syscon, Inc.

    "uri bushey" <> wrote in message
    news:ceugpq$35rs$...
    > I have a Python program that is built on an infrastructure of quite a
    > few other programs, but I would like to create a standalone nonetheless.
    >
    > It doesn't necesarily have to be its own executable, although this is
    > the most attractive option - it could just mean distributing the entire
    > python distribution with it in an installer or something.
    >
    > However, here is what I have called in my python file:
    > Tkinter, and multiple Pmw widgets
    > WaveSurfer, called as a "Wsurf" widget, which is a great little program
    > used for Spectrograms of wave files etc. It relies on Tcl/Tk and the
    > SNACK library, which also have to be installed for my script to work.
    >
    > Can anyone help? I'm open to any option, py2xe, mcmillan's, or cx_freeze
    > or whatever that program is, or even an installer that installs all of
    > those programs.
    >
    > I'm vying for the most elegant solution.
    >
    > Thanks!
    >
    > --uri
     
    Larry Bates, Aug 6, 2004
    #2
    1. Advertising

  3. On 2004-08-06, Larry Bates <> wrote:

    >> I have a Python program that is built on an infrastructure of
    >> quite a few other programs, but I would like to create a
    >> standalone nonetheless.
    >>
    >> It doesn't necesarily have to be its own executable, although
    >> this is the most attractive option - it could just mean
    >> distributing the entire python distribution with it in an
    >> installer or something.


    That's a false dichotomy. There is a choice in-between a
    "stand-alone program" and "an entire Python distribution":
    Something like py2exe which creates a "distribution" containing
    only the things (dll's and compiled+compressed Python modules)
    needed by your application.

    Besides, expecting to create a stand-alone executable is pretty
    unrealistic these days. There are very, very few stand-alone
    Win32 programs any more (putty.exe is the only one I've seen in
    the past 5 years). Everything else in the Win32 world seems to
    need to have a set of files "installed" using an installer.

    > I've found that py2exe and Inno Setup Installeer to be a good
    > combination (for Windows). It isn't a single executable, but
    > then what modern program is any more. It doesn't require
    > distribution/installation of Python. I've used it to install
    > some pretty complex combinations (wxWindows, PIL, ReportLab,
    > etc.) with no problems. Inno Setup has proven to be flexible
    > enough to install everything that I've done so far.


    Same here. I've used py2exe + Inno Setup for a handfull of
    small wxPython applications and it's all worked quite nicely.

    > I can't speak to Linux installations because I have always
    > just used the Python installation already there.


    Yup.

    --
    Grant Edwards grante Yow! I invented skydiving
    at in 1989!
    visi.com
     
    Grant Edwards, Aug 6, 2004
    #3
  4. uri bushey

    Elbert Lev Guest

    > > I can't speak to Linux installations because I have always
    > > just used the Python installation already there.

    >
    > Yup.


    Instalation is there, but not the third party packages.
     
    Elbert Lev, Aug 6, 2004
    #4
  5. uri bushey

    simo Guest

    Grant Edwards <> wrote:

    > Same here. I've used py2exe + Inno Setup for a handfull of
    > small wxPython applications and it's all worked quite nicely.


    Same here too, InnoSetup is especially useful if you need to bundle
    auxilliary files like icons, images, ChangeLogs etc. or make
    desktop/startbar shortcuts.

    I think py2exe is perfect, cx_Freeze is still not 100%

    > > I can't speak to Linux installations because I have always
    > > just used the Python installation already there.


    > Yup.


    I tried McMillan Installer on Linux, and had little success - because
    even if you get the binary to build, it usually has .so dependency
    issues - basically you need wxWidgets or GTK+ or whatever installed on
    top of any Python you've coded.

    I've falling back to providing the source and leaving it as an
    exercise to the user to install all the Python modules they may not
    have in their base install.

    One of the attractions of IronPython is that you can build a single
    ..exe (or .bin on Linux I guess?) although the user still needs the CLR
    runtime installed.
     
    simo, Aug 7, 2004
    #5
  6. uri bushey

    uri bushey Guest

    So per everyone's advice, I decided to make a go of it with py2exe.
    Unfortunately I'm getting a traceback instead of an executable.
    It states: "WindowsError: [Errno 3] The system cannot find the path
    specified:
    'C:\\PythonProgram\\dist\\library.zip\\Pmw/*.*'
    I did some searching and discovered that I have to use 'bundlepmw.' So I
    did this, and then I get an error about one of my libraries instead:

    _tkinter.TclError: Can't find package wsurf 1.7

    So I added this to dist\tcl, and then I get an error about my next
    library, snack. Well, adding all of these libraries is eventually going
    to defeat the purpose of freezing the program, isn't it? Wsurf itself is
    4 MB!

    Is there something else i should be doing?
     
    uri bushey, Aug 10, 2004
    #6
  7. uri bushey

    David Fraser Guest

    simo wrote:
    > One of the attractions of IronPython is that you can build a single
    > .exe (or .bin on Linux I guess?) although the user still needs the CLR
    > runtime installed.

    One of the attractions of Python is that you can build a single frozen
    file although the user still needs the Python interpreter installed ...

    David
     
    David Fraser, Aug 19, 2004
    #7
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Replies:
    12
    Views:
    1,654
    Dave Thompson
    Jan 10, 2005
  2. Coca
    Replies:
    7
    Views:
    744
    Aidan Grey
    Aug 24, 2004
  3. Replies:
    18
    Views:
    626
    Dave Thompson
    Jan 10, 2005
  4. lone_eagle
    Replies:
    3
    Views:
    638
    psykeedelik
    May 26, 2009
  5. Casey Hawthorne
    Replies:
    14
    Views:
    450
Loading...

Share This Page