【发布时间】:2013-01-27 03:21:31
【问题描述】:
我在将 matplotlib 导入谷歌应用引擎时遇到问题。我用谷歌搜索并找到了一些解决方案,但似乎没有一个对我有用。在我的 app.yaml 文件中,我有
libraries:
- name: matplotlib
version: latest
- name: numpy
version: latest
在我的 python 文件中,我将导入我可以拥有的 numpy
numpy.arange(10)
问题是当我尝试导入 matplotlib 时
import matplotlib as plt
访问页面时出现此错误
The website encountered an error while retrieving http://localhost:8080/.
It may be down for maintenance or configured incorrectly.
我删除了 matplotlib 导入,刷新,一切都恢复正常了。我看到应用引擎网页使用 matplotlib,例如 http://gae-matplotlib-demo.appspot.com 导入 matplotlib,所以我知道这是可能的。
如何在 Google App Engine 中使用 matplotlib?
【问题讨论】:
-
应用引擎here上有一些关于matplotlib的讨论。也许您遇到了开发 SDK 问题?
-
你的电脑上安装了matplotlib吗?
标签: python google-app-engine import matplotlib