[Pythonmac-SIG] Py2app: import errors while running the installed app (PyQt4.Qt imports)
Ninad Sathaye
ninad at nanorex.com
Tue Mar 13 14:34:41 CET 2007
Hi Ronald,
Thanks for the reply. I tried the command you suggested (with a minor
modification)
python setup.py py2app --packages=PyQt4
But during the pkg building process, it printed same error: " malformed object
(unknown flavor for flavor number 0 in
LC_UNIXTHREAD command 10 can't byte swap it) "
(A) The pkg got built after this but the installed app failed to start...this
time, it was unable to find PyQt4.Qt module. The package contents showed PyQt4
folder under "Contents/Resources/lib/python2.3/"
(B) I manually transferred this PyQt4 to site-packages.zip ...it seemed to
resolve the above import problem but this time it was unable to import Image
module (Note: I could find this module under
Contents/Resources/lib/python2.3/site-packages.zip ) .
[ Item (B) above could be a different issue so I will stop here unless someone
asks for further details ]
Ninad
P.S. In my last email, I neglected to mention about the errors I received
during the package building process. The problem was similar to the one
described in this post:
http://mail.python.org/pipermail/pythonmac-sig/2006-August/018084.html and the
temporary fix suggested there resolved it. (at least the pkg got built)
> -----Original Message-----
> From: Ronald Oussoren [mailto:ronaldoussoren at mac.com]
> Sent: Monday, March 12, 2007 10:51 AM
> To: Ninad Sathaye
> Cc: pythonmac-sig at python.org
> Subject: Re: [Pythonmac-SIG] Py2app: import errors while
> running theinstalledapp (PyQt4.Qt imports)
>
>
> On Monday, March 12, 2007, at 03:30PM, "Ninad Sathaye"
> <ninad at nanorex.com> wrote:
> >
> >Hi all,
> >
> >Does anyone know how to resolve this issue? (or if this or similar
> >topic has been discussed previously, can someone point me to that
> >thread?)
>
> Could you try using the following command to build the app bundle:
>
> python setup.py py2app --packages=PyQt
>
> AFAIK Py2app used to contain some special code for PyQt but
> that got ripped out because it no longer worked with recent
> versions of PyQt and nobody bothered to send an updated recipe.
>
> Ronald
>
> >
> >Thanks,
> >
> >Ninad
> >
> >> -----Original Message-----
> >> From: Ninad Sathaye [mailto:ninad at nanorex.com]
> >> Sent: Thursday, March 01, 2007 10:22 AM
> >> To: pythonmac-sig at python.org
> >> Subject: [Pythonmac-SIG] Py2app: import errors while running the
> >> installedapp (PyQt4.Qt imports)
> >>
> >> Hi,
> >>
> >> I have built a package using py2app on MACOSX 10.3.9. My
> application
> >> uses Qt4.2
> >> (PyQt4.1.x) framework. When run the application
> (installed using the
> >> created
> >> package) it gives import errors.
> >>
> >> Example:
> >> "
> >> from PyQt4.Qt import QApplication
> >> ImportError : Cannot import name QApplication.
> >> "
> >>
> >> Py2app seems to break my PyQt4 directory into two parts
> and put them
> >> in different places :
> >> (A) the Qt.pyc into
> >> "/Contents/Resources/lib/python2.3/site-packages.zip/PyQt4"
> >>
> >> (B) and the .so files [Example: QtGui.so] into
> >> "/Contents/Resources/lib/python2.3/lib-dynload/PyQt4"
> >>
> >> Am I leaving out a necessary option? [ I tried manually
> copying .so
> >> files from
> >> (B) to (A) ..that resolved the import problems but then my app
> >> crashed.]
> >>
> >> ++++
> >> Note: During the pkg building process, I got an error which seems
> >> identical to the one in this message --
> >>
> >> "http://mail.python.org/pipermail/pythonmac-sig/2007-February/
> >> 018659.html" --
> >>
> >> " malformed object (unknown flavor for flavor number 0 in
> >> LC_UNIXTHREAD command 10 can't byte swap it) "
> >>
> >> But the package still got built. Could this be the underlying
> >> problem?
> >>
> >> +++
> >> Specs --
> >> *System: PowerPC G4, OSX 10.3.9.
> >> *Python version: Python2.3
> >> *Py2app details: py2app-0.3.5, macholib-1.1, modulegraph-0.7,
> >> setuptools-0.6c3
> >> ++++
> >>
> >> Any help would be greatly appreciated.
> >>
> >> Best Regards,
> >>
> >> Ninad
> >>
> >>
> >>
> >>
> >
> >
> >_______________________________________________
> >Pythonmac-SIG maillist - Pythonmac-SIG at python.org
> >http://mail.python.org/mailman/listinfo/pythonmac-sig
> >
> >
>
More information about the Pythonmac-SIG
mailing list