Sorry guys, the problem seems to be less general. Actually, the error is triggered when I try to import numpy before PyQt4. It imports without any problems after PyQt4. I still don't know what the problem actually is, but at least my scripts work. Thanks, Tim.