【发布时间】:2017-05-10 04:48:46
【问题描述】:
我正在尝试在我的应用程序中使用matplotlib。我在python2.7中创建了一个virtualenv,pip安装了matplotlib,在本地成功运行。
但是,当我将应用程序部署到 heroku(在 pip freeze 和其他必要步骤之后)时,我的应用程序崩溃了。当我检查日志时,我看到以下内容:
import _tkinter # If this fails your Python may not be configured for Tk
ImportError: No module named _tkinter
这很奇怪,因为应用程序在 venv 下成功运行在本地。 heroku python 环境是否未配置为运行matplotlib?如果是这样,我应该采取哪些步骤来启用它?
【问题讨论】:
标签: python heroku matplotlib tkinter