________________________________ > Date: Sun, 25 Nov 2012 16:58:32 -0800 > From: [email protected] > To: [email protected] > Subject: [PyInstaller] Re: If PyInstaller EXEs modify PYTHONPATH, then > using python via Popen might fail to find builtin modules. Does it? > > Hi! > > Looks like I am going to have to force the addition of all the paths in > sys.path into the spec file then build my EXEs. > > Unfortunately, even this sucks as those python paths are specific to > the system we build on, so what if the user has python in c:\program > files\python27 instead of the default c:\python27, or of course any > other path they may want? Uggh. > > Hartmut: I apologize for giving the idea that python is required for > our app. But, since our app uses Popen to run subcommands, it may be > the case that some customer (and does, which is how we found it!) wants > to use python within our app. > > Steve: Thanks for the idea! I will ponder that. > > -- Quentin > Quentin, You shouldn't need to do this as if your python modules are being found using sys.path then, provided the user and you have accepted the default for installing extension modules of installing them to [PYTHONPATH]/lib/site-packages then your and their python should find them. I would strongly suggest that any execute command that you provide in your app be in a try: except block so that you can pass on any errors such as failed import/failed to find python, etc., and if the user is expert enough to be calling python scripts, or has such expertise on hand, from within your app then they should be able to sort out things like missing dependencies _providing you let them see the error message_. Gadget/Steve
-- 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.
