Thanks Giovanni for your suggestion. I ended up switching to execfile because of this realization.
I think the ""ImportError: DLL load failed: %1 " error was being thrown when the native system python was being called by subprocess.call["python" , "termp_scr.py"] But after switching to execfile , I can run the temp script with the modules "pre-loaded" into the wxpython calling program. Hari On Thu, Feb 2, 2012 at 9:16 PM, Giovanni Bajo <[email protected]> wrote: > Il giorno 27/gen/2012, alle ore 21:13, harijay ha scritto: > > Hello, > I am running 64 bit windows 7 . > > I have both 32 bit python and 64 bit python resident on my system. I > am trying to build a standalone exe file for my python application to > run on 32 bit Windows. > The application is a wxpython application that creates a python script to a > temp file that is called by subprocess.call from within the wxpython > application. > > > When packaged with PyInstaller, what do you expect subprocess.call() to > invoke? You can't directly running a Python script without a Python > interpreter installed in the environment, and the packaged PyInstaller > executable will not make this magically work for you. > > You will have to change this part of your program to use execfile() to > invoke this script; this way, the script will get executed by the same > Python interpreter/process running the main application. This will work only > if the generated script does not import any package/module which was not > included in the main application. > > I could get an executable that launched right. I have wxpython, > reportlab , pyyaml and other c-code containing python package dependencies. > > However at runtime > > I am getting a "ImportError: DLL load failed: %1 is > not a valid Win32 application." > > > Sorry, I don't follow. Does this error happen when spawning the temporary > file? > -- > Giovanni Bajo :: [email protected] > Develer S.r.l. :: http://www.develer.com > > My Blog: http://giovanni.bajo.it > > > > > -- You received this message because you are subscribed to the Google Groups "PyInstaller" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/pyinstaller?hl=en.
