Hi, I found that the problem was that pyinstaller ships with its own optparse wrapper/implementation. The relevant files used dos line endings. After I converted them to be plain unix text all worked fine.
Regards, Louai On Jul 21, 12:08 am, Rishi Khare <[EMAIL PROTECTED]> wrote: > 1.Try adding the following to your spec file, sometimes the imports > added to spec file resolves all the issues of missing modules and it > forces their inclusion > import optparse > > 2.check for your PYTHONPATH first,and make sure it is not being > imported as a sub module earlier before it is being imported as a > complete module. > 3.use Pyinstaller-1.3/ArchiveViewer.py to find out the contents of > your executable created , and make sure that optparse is being > included there. > let us know if that helped. > > it might be working fine on one machine because it might be able to > import it from the default path there which is absent on another > machine. > --Thanks > Rishi Khare > > Louai Al-Khanji wrote: > > Hi all, > > I'm having some trouble with imports. The weird thing is that it works > > fine on one machine, but not on another one, and I cannot figure out > > why. > > > Specifically importing optparse seems to be broken somehow. I tested > > some other modules like sys and os and they work ok, but the > > following: > > > import optparse > > ... > > parser = optparse.OptionParser(...) > > > breaks at the OptionParser construction. The specific error is: > > > Traceback (most recent call last): > > File "<string>", line 137, in ? > > AttributeError: 'module' object has no attribute 'OptionParser' > > > Any pointers? --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
