[PyQt] pyuic4 problem

William Kyngesburye woklist at kyngchaos.com
Fri Aug 6 03:45:11 BST 2010

On Aug 5, 2010, at 9:18 PM, David Quinn wrote:

> Thanks for the advice, William.
> I followed the instructions for installation (though I could not find
> all the files to delete).

It's possible some files may be in /usr/bin and /usr/include.  (which files did you not find?)

> I now received the following error message:
> david$ pyuic4
> Traceback (most recent call last):
>  File "/Library/Python/2.6/site-packages/PyQt4/uic/pyuic.py", line 4,
> in <module>
>    from PyQt4 import QtCore
> ImportError: dlopen(/Library/Python/2.6/site-packages/PyQt4/QtCore.so,
> 2): Symbol not found: _sipQtConnect
>  Referenced from: /Library/Python/2.6/site-packages/PyQt4/QtCore.so
>  Expected in: flat namespace
> in /Library/Python/2.6/site-packages/PyQt4/QtCore.so

Just to make sure - rebuild *both* sip and pyqt, with clean source would help.  And Qt Cocoa is a must (not the Carbon version) for 64bit.  If your using Carbon, don't add --arch=x86_64 for SIP, and use the --use-arch=i386 option for PyQt.

... I didn't want to comment, but I also notice your use of Fink.  Are you running the system python or from Fink?

My compile instructions should build both 32 abd 64bit SIP and PyQt, so it shouldn't matter if you somehow run Python 32bit instead of the default 64bit.  Check the binaries to make sure:

  file /Library/Python/2.6/site-packages/PyQt4/QtCore.so
  file /Library/Python/2.6/site-packages/sip.so

> My .bash_profile looks like this:
> # Setting PATH for MacPython 2.6
> # The orginal version is saved in .bash_profile.pysave
> PATH="/System/Library/Frameworks/Python.framework/Versions/2.6/bin:${PATH}"
> export PATH
No need if you use the /usr/local and /Library/Python install locations.

P.S.  I also noticed your "qgis_scratch".  Are your developing a plugin for Qgis?  I make the "official" Qgis binaries which include a bundled Qt/PyQt, and if there is something that I could do with the distribution to help, let me know (like adding the sip/pyqt executables and includes).  I didn't think about that possibility. Though I do purposely strip out the Qt includes to save space.

... hmmmm ....

William Kyngesburye <kyngchaos*at*kyngchaos*dot*com>

[Trillian]  What are you supposed to do WITH a maniacally depressed robot?

[Marvin]  You think you have problems?  What are you supposed to do if you ARE a maniacally depressed robot?  No, don't try and answer, I'm 50,000 times more intelligent than you and even I don't know the answer...

- HitchHiker's Guide to the Galaxy

More information about the PyQt mailing list