On ticket 696 (http://scipy.org/scipy/scipy/ticket/696), you can find a minimal example of code reproducing the problem. It does not use f2py anymore, but the trouble seems to be linked to the import of pylab... -- Fabrice Silva