摘要: import matplotlibmatplotlib.use('Agg')import matplotlib.pyplot as pltfrom Cstring import StringIOy = [3, 10, 7, 5, 3, 4.5, 6, 8.1]N = len(y)x = range(... 阅读全文
posted @ 2015-09-12 17:12 juejiang 阅读(2705) 评论(0) 推荐(0) 编辑
摘要: uwsgi+flask的python有自身的virtual environment,可以通过如下命令进入. venv/bin/activate虽然通过sudo apt-get install python-matplotlib安装上了matplotlib,并且在ubuntu环境中可以import m... 阅读全文
posted @ 2015-09-12 15:46 juejiang 阅读(463) 评论(0) 推荐(0) 编辑
摘要: 直接将app.debug = True时,程序出错并没有出现调试界面。按照如下设置,flask+uwsgi情况下,python报错时会在浏览器中提示错误信息。方便调试。from werkzeug.debug import DebuggedApplicationapp.wsgi_app = Debug... 阅读全文
posted @ 2015-09-12 15:41 juejiang 阅读(668) 评论(0) 推荐(0) 编辑