See the thread:
PyKDE build fails on kio with KDE-3.1.1
for a description of a probelm building PyKDE against Python 2.3
Applies to any version of KDE, but ONLY with Python 2.3.
The likely fix (untested yet) is in my reply in that thread.
Jim