Switch default backend of matplotlib to 'agg' in the rc file.