[PyQt] pyqt loading libQtGui.dylib twice on Mac OS X
Jeremy Sanders
jeremy at jeremysanders.net
Sat Nov 19 16:57:00 GMT 2011
Martin Zibricky wrote:
> Hi,
>
> I'm working on PyInstaller (www.pyinstaller.org) and recently for Mac
> platform we switched from using LD_LIBRARY_PATH to use
> @executable_path.
>
> However, the side effect is that frozen PyQt app won't run if macports
> is installed.
>
> If I don't use code 'from PyQt4 import Qt' everything seems ok.
>
> But when I freeze a PyQt app with that line I get the wollowing error:
>
> objc[16341]: Class QCocoaColorPanelDelegate is implemented in
> both /private/tmp/test_pyqt4.app/Contents/MacOS/libQtGui.4.dylib
> and /opt/local/lib/libQtGui.4.dylib. One of the two will be used. Which
> one is undefined.
>
> Full output:
> http://pastebin.com/16AEkHx1
>
> Is there anything I could do to fix it so apps created with pyinstaller
> would work?
I've had similar problems with pyinstaller, where Qt plugins don't use the
right Qt library. The otool program is great for fixing which libraries a
dylib or executable is using. I've attached a script I use for fixing which
libaries the Qt plugins use, which may fix your problem (change path at
top).
Jeremy
--
http://www.jeremysanders.net/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: fixup_veusz_dist.sh
Type: application/x-shellscript
Size: 546 bytes
Desc: not available
URL: <http://www.riverbankcomputing.com/pipermail/pyqt/attachments/20111119/9cd2a84a/attachment.bin>
More information about the PyQt
mailing list