[Pythonmac-SIG] [PyQt] PyQt and py2app conflicting pre-installed Qt version

Michael Held michael.held at bc.biol.ethz.ch
Thu Apr 22 19:15:38 CEST 2010


I found a solution in this list from 2009-12-15. sorry for posting again.


> Brilliant...it turned out that the Qt libraries were being loaded *twice* – once from inside the bundle and once from the libraries on my computer.
> 
> The hack fix was to create a qt.conf file inside Contents/Resources and give it a bad path...this way only the libraries inside the bundle are being loaded. Putting this inside qt.conf:
> 
> [Paths]
> Plugins = bollocks
> 
> Did the trick :)
> 
> Thanks Emanuele!

-------------- next part --------------
An embedded message was scrubbed...
From: aditya bhargava <bluemangroupie at gmail.com>
Subject: Re: [Pythonmac-SIG] Problems with py2app and qt
Date: Tue, 15 Dec 2009 14:27:10 -0600
Size: 18712
URL: <http://mail.python.org/pipermail/pythonmac-sig/attachments/20100422/514e2b32/attachment-0001.eml>
-------------- next part --------------




On Apr 22, 2010, at 6:52 PM, Michael Held wrote:

> hi PyQt,
> 
> after merging to the new Qt 4.6 and PyQt 4.7 I observed strange crashes of my py2app bundled application on another test computer. on my development Mac everything was fine.
> 
> running the binary from my .app directly on the shell I saw a number of strange warnings about two Qt versions being used in an undefined way. on the test Mac Qt 4.5 was installed and that was mixed with my Qt 4.6 from the app which caused the crash.
> I checked my env and no DYLD_LIBRARY_PATH is set. after deleting the old Qt 4.5 version everything was fine on the test Mac.
> 
> the question is now: does my app conflict with any pre-installed Qt version a user might have? what can I do against it?
> 
> see a shortened output from the binary below.
> 
> thanks a lot!
> michael
> 
> /Users/analyzer/Downloads/test_package/test.app/Contents/MacOS/test objc[32502]: Class QMacSoundDelegate is implemented in both /Users/analyzer/Downloads/test_package/test.app/Contents/MacOS/../Frameworks/QtGui.framework/Versions/4/QtGui and /Library/Frameworks/QtGui.framework/Versions/4/QtGui. One of the two will be used. Which one is undefined.
> objc[32502]: Class QCocoaColorPanelDelegate is implemented in both /Users/analyzer/Downloads/test_package/test.app/Contents/MacOS/../Frameworks/QtGui.framework/Versions/4/QtGui and /Library/Frameworks/QtGui.framework/Versions/4/QtGui. One of the two will be used. Which one is undefined.
> objc[32502]: Class QNSOpenSavePanelDelegate is implemented in both /Users/analyzer/Downloads/test_package/test.app/Contents/MacOS/../Frameworks/QtGui.framework/Versions/4/QtGui and /Library/Frameworks/QtGui.framework/Versions/4/QtGui. One of the two will be used. Which one is undefined.
> objc[32502]: Class QCocoaFontPanelDelegate is implemented in both /Users/analyzer/Downloads/test_package/test.app/Contents/MacOS/../Frameworks/QtGui.framework/Versions/4/QtGui and /Library/Frameworks/QtGui.framework/Versions/4/QtGui. One of the two will be used. Which one is undefined.
> objc[32502]: Class QNSWindowProxy is implemented in both /Users/analyzer/Downloads/test_package/test.app/Contents/MacOS/../Frameworks/QtGui.framework/Versions/4/QtGui and /Library/Frameworks/QtGui.framework/Versions/4/QtGui. One of the two will be used. Which one is undefined.
> objc[32502]: Class QNSPanelProxy is implemented in both /Users/analyzer/Downloads/test_package/test.app/Contents/MacOS/../Frameworks/QtGui.framework/Versions/4/QtGui and /Library/Frameworks/QtGui.framework/Versions/4/QtGui. One of the two will be used. Which one is undefined.
> objc[32502]: Class QCocoaPageLayoutDelegate is implemented in both /Users/analyzer/Downloads/test_package/test.app/Contents/MacOS/../Frameworks/QtGui.framework/Versions/4/QtGui and /Library/Frameworks/QtGui.framework/Versions/4/QtGui. One of the two will be used. Which one is undefined.
> objc[32502]: Class QCocoaPrintPanelDelegate is implemented in both /Users/analyzer/Downloads/test_package/test.app/Contents/MacOS/../Frameworks/QtGui.framework/Versions/4/QtGui and /Library/Frameworks/QtGui.framework/Versions/4/QtGui. One of the two will be used. Which one is undefined.
> objc[32502]: Class QNSMenu is implemented in both /Users/analyzer/Downloads/test_package/test.app/Contents/MacOS/../Frameworks/QtGui.framework/Versions/4/QtGui and /Library/Frameworks/QtGui.framework/Versions/4/QtGui. One of the two will be used. Which one is undefined.
> objc[32502]: Class QNSStatusItem is implemented in both /Users/analyzer/Downloads/test_package/test.app/Contents/MacOS/../Frameworks/QtGui.framework/Versions/4/QtGui and /Library/Frameworks/QtGui.framework/Versions/4/QtGui. One of the two will be used. Which one is undefined.
> objc[32502]: Class QNSImageView is implemented in both /Users/analyzer/Downloads/test_package/test.app/Contents/MacOS/../Frameworks/QtGui.framework/Versions/4/QtGui and /Library/Frameworks/QtGui.framework/Versions/4/QtGui. One of the two will be used. Which one is undefined.
> QObject::moveToThread: Current thread (0xa300220) is not the object's thread (0x4c80490).
> Cannot move to target thread (0x4c80490)
> 
> On Mac OS X, you might be loading two sets of Qt binaries into the same process. Check that all plugins are compiled against the right Qt binaries. Export DYLD_PRINT_LIBRARIES=1 and check that only one set of binaries are being loaded.
> QObject::moveToThread: Current thread (0xa300220) is not the object's thread (0x4c80490).
> Cannot move to target thread (0x4c80490)
> 
> _______________________________________________
> PyQt mailing list    PyQt at riverbankcomputing.com
> http://www.riverbankcomputing.com/mailman/listinfo/pyqt




More information about the Pythonmac-SIG mailing list