[(Basically this is identical to this a few months ago: import matplotlib failing without a module named _tkinter on heroku
, however, the only solution does not seem to work. (Unfortunately, I can not comment on the answer provided there, because I do not have enough StackOverflow reputation .))]
I am using matplotlib in my application. Everything is working fine. However, when I click on my app on Heroku, I get an error message:
import _tkinter # If this fails your Python may not be configured for Tk
ImportError: No module named _tkinter
I tried to get around Tkinter by doing:
import matplotlib
matplotlib.use('Agg')
import matplotlib.pyplot as plt, mpld3
However, this still causes the same error.
Has anyone found a solution for this or has a Heroku application with matplotlib that works? I am running Python 2.7.13 (this is also the version of Heroku installed when I click on the application).