In my case I had to rm -rf \~/.matplotlib/tex.cache, as suggested here: https://tug.org/pipermail/tex-live/2013-February/033008.html
You can find the directory that needs to be wiped in python:
import matplotlib as mpl
mpl.get_cachedir()
as mentioned here: matplotlib used in parallel crashes because of cache files (tex-renderin)