I manually installed PyQt-4.9.1 and sip-4.13.2 under /tmp/yifli because the ones currently installed on the machine (running Fedora 13) are too old for my software.
After that, I added their locations to $PYTHONPATH and here is the output of sys.path:
>>> import sys
>>> print sys.path
['', '/tmp/yifli/lib/python/site-packages', '/tmp/yifli/lib/python/site-packages/PyQt4', '/usr/lib/python26.zip', '/usr/lib/python2.6', '/usr/lib/python2.6/plat-linux2', '/usr/lib/python2.6/lib-tk', '/usr/lib/python2.6/lib-old', '/usr/lib/python2.6/lib-dynload', '/usr/lib/python2.6/site-packages', '/usr/lib/python2.6/site-packages/Numeric', '/usr/lib/python2.6/site-packages/PIL', '/usr/lib/python2.6/site-packages/gst-0.10', '/usr/lib/python2.6/site-packages/gtk-2.0', '/usr/lib/python2.6/site-packages/scim-0.1', '/usr/lib/python2.6/site-packages/setuptools-0.6c11-py2.6.egg-info', '/usr/lib/python2.6/site-packages/webkit-1.0']
However, the error I got is due to the fact that somehow the old PyQt4 is still being used:
>>> import sip
>>> sip.__file__
'/tmp/yifli/lib/python/site-packages/sip.so'
>>> import PyQt4
>>> PyQt4.__file__
'/usr/lib/python2.6/site-packages/PyQt4/__init__.pyc'
How come?
P.S., I did get errors when I compiled Qt which complained some header file for Qt Phonon module cannot be found. But since I don't use that module, I just ignored it.
Yifei