import matplotlib failing with No module named _tkinter on heroku

前端 未结 1 1986
一整个雨季
一整个雨季 2021-02-19 14:46

I\'m trying to use matplotlib in my application. I created a virtualenv in python2.7, pip installed matplotlib, and it\'s successfully running on local.

How

相关标签:
1条回答
  • 2021-02-19 15:30

    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 :-)

    0 讨论(0)
提交回复
热议问题