Installer Problem Finding Modules

Gordon McMillan gmcm at hypernet.com
Wed Apr 5 10:41:20 EDT 2000


Gordon Williams wrote:

> I am trying to run Gordon McMillan's Installer (3f on W95) and I am having
> a problem with it finding the modules that I am importing into the main
> program. 
[snip]
> The installer ignores the all the imports except for the wxPython stuff
> which it appears to get all of.  Any ideas where I may be going wrong.  I
> hope that I dont have to list all these modules as dependancies as some of
> these modules also call other modules.

These modules are in the same directory as your main script? 
For some reason Win95 fails here, though NT succeeds. The 
workaround seems to be to set 
PYTHONPATH=<absolute path to your directory>
in the DOS box before running the Installer.
 
> Maybe this is a related problem, but I dont think so:
> All the modules along with the main module are in a sub directory of the
> installer program.  When I run python ..\simple.py bs_main.py from a dos
> box
> I was geting an error "can't open 'E:Program" when it it was trying to
> start build.py.  I ended up changing simple.py line 74 to
> cmd = '"%s" %s %s %s' % (sys.executable,
>                            '../Builder.py',                      <<< change
> is here
>                            cfgfile, tkcfg)
> 
> to get it to work.

Grrr. The fact that Windows allows spaces in directory names 
doesn't mean the "feature" should be used.

A better fix, I think, is to quote all the %s's.

- Gordon




More information about the Python-list mailing list