The ultimate irony Trouble installing Installer.
Alan James Salmoni
alan_salmoni at yahoo.com
Mon Mar 10 13:22:57 CET 2003
chris.lyon at spritenote.co.uk (Chris Lyon) wrote in message news:<d232c5e.0303090214.5433a18c at posting.google.com>...
> I'm trying to construct a mechanism to install a small set of scripts
> to either windows or Linux to machines that might not have python(
> obviously mostly Windows).
> cd to that directory run c:\python22\python Configure.py
> and get:-
> Traceback (most recent call last):
> File "Configure.py", line 13, in ?
> import mf, bindepend
> File "mf.py", line 234, in ?
> import hooks
> ImportError: No module named hooks
> Now it is EXCEPTIONALLY depressing when you can't even install an
I can appreciate that, but sadly haven't had the same problem myself
and cannot help you here. However...
> Secondly Has anyone got a step by step guide somewhere to how exactly
> to distribure little_app.py this way? I'm sure Installer is an
> excelent tool but the manuals contain no obvious example? Do I
> construct a spec file? does makeCOMServer do everything for me? Is the
> COMServer the entire windows component that I need or is this just a
> specific subset of operations?
All I did after the configure step was type into a console (assuming
that "script.py" is the program I want packaged, and that it is a GUI
python makespec.py --noconsole script.py
python build.py script\script.py
On the first line, the "script.py" is the Python script you want
packaged. The installer should deal with all dependencies for you, and
this instruction will make the spec file for you. It is stored in a
directory somewhere in the installer directory. For the above example
it will be in script\script.spec.
I understand for more complex applications, you may need to hand-alter
the spec file, but my application uses wxPython, Numeric and SciPy and
everything works just fine with the above, and the spec file doesn't
need to be altered.
The next line (build.py) builds the application for you. The
executable will appear somewhere in that script directory. If you
want, you can specify a single directory install (you get a directory
with loads of files in it), or a single executable (just one file).
The single directory is the default, but if you want one file, just
put "--onefile" after the "--noconsole" bit. The "--noconsole" bit
assumes that you have a GUI application and don't want a little
console popping up every time.
That's it! If you want, there is also a program called "Inno
Installer" (free to download and use) which makes a self-extracting
installer very much like InstallShield for that professional touch.
The instructions aren't really clear about how simple the process is
for making an executable, but once you have done the "configure" bit,
the two lines above are really all that you need.
btw - it's exactly the same for Linux.
Best of luck!
Alan James Salmoni.
More information about the Python-list