import matplotlib failing with No module named _tkinter on heroku import matplotlib failing with No module named _tkinter on heroku tkinter tkinter

import matplotlib failing with No module named _tkinter on heroku


This should do the trick

matplotlib.use('Agg')import matplotlib.pyplot as plt

This will set your Matplotlib backend to use Agg instead of Tk. Just worked for me at least :-)