Google AppEngine错误:“No module named flask” [英] Google AppEngine error: "No module named flask"

查看:242
本文介绍了Google AppEngine错误:“No module named flask”的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我遵循 WebPutty的github 页面提供的说明,将我自己的WebPutty分叉GAE。它在当地运行良好。我无法成功运行fab部署(出现错误没有名为appengine.api的模块),所以试着只通过appcfg.py更新来尝试安装GAE。不幸的是,当我访问URL时,这给了我以下错误:No module named flask。



想要了解如何解决的任何见解/帮助。

解决方案

我不知道你是否已经这样做了,但是要使用GAE和python,你的项目,如Flask,Werkzeug,Jinja2和SimpleJson。

这里有我在我的项目中使用的脚本:

 #设置项目路径
PATH_PROJECT =〜/ Development / python / projects / scheduler -i-sweated-yesterday
$ b $ cd〜 / Downloads


#安装Flask:https://github.com/mitsuhiko/flask/tags

wget https://github.com/ mitsuhiko / flask / archive / 0.9.zip
unzip 0.9.zip
mv flask-0.9 / flask $ PATH_PROJECT / flask


#安装Werkzeug:https: //github.com/mitsuhiko/werkzeug/tags

wget https://github.com/mitsuhiko/werkzeug/archive/0.8.3.zip
解压缩0.8.3.zip
mv werkzeug-0.8.3 / werkzeug $ PATH_PROJECT / werkzeug


#安装Jinja2:https://github.com/mitsuhiko/jinja2/tags

wget https:// g ithub.com/mitsuhiko/jinja2/archive/2.6.zip
unzip 2.6.zip
mv jinja2-2.6 / jinja2 $ PATH_PROJECT / jinja2


#安装SimpleJson:https://github.com/simplejson/simplejson/tags

wget https://github.com/simplejson/simplejson/archive/v3.0.5.zip
解压缩v3 .0.5.zip
mv simplejson-3.0.5 / simplejson $ PATH_PROJECT / simplejson

保存作为install_packages_dependencies.sh,然后在shell中运行:

  bash install_packages_dependencies.sh 


I'm following the directions provided by WebPutty's github page to put my own fork of WebPutty up on GAE. It runs fine locally. I wasn't able to run "fab deploy" successfully (got error "no module named appengine.api"), so instead tried to put it up on GAE by just doing appcfg.py update. Unfortunately, this gives me the following error when I access the URL: "No module named flask".

Would love any insight/assistance as to how to resolve.

解决方案

I don't know if you already did this, but to work with GAE and python you need have the dependent packages inside your project, as Flask, Werkzeug, Jinja2 and SimpleJson.

Here there is the script I use on my project:

# set the path of your project
PATH_PROJECT=~/Development/python/projects/scheduler-i-sweated-yesterday

cd ~/Downloads

#
# Installing Flask: https://github.com/mitsuhiko/flask/tags
#
wget https://github.com/mitsuhiko/flask/archive/0.9.zip
unzip 0.9.zip
mv flask-0.9/flask $PATH_PROJECT/flask

#
# Installing Werkzeug: https://github.com/mitsuhiko/werkzeug/tags
#
wget https://github.com/mitsuhiko/werkzeug/archive/0.8.3.zip
unzip 0.8.3.zip
mv werkzeug-0.8.3/werkzeug $PATH_PROJECT/werkzeug

#
# Installing Jinja2: https://github.com/mitsuhiko/jinja2/tags
#
wget https://github.com/mitsuhiko/jinja2/archive/2.6.zip
unzip 2.6.zip
mv jinja2-2.6/jinja2 $PATH_PROJECT/jinja2

#
# Installing SimpleJson: https://github.com/simplejson/simplejson/tags
#
wget https://github.com/simplejson/simplejson/archive/v3.0.5.zip
unzip v3.0.5.zip
mv simplejson-3.0.5/simplejson $PATH_PROJECT/simplejson

Save as install_packages_dependencies.sh and after that run in the shell:

bash install_packages_dependencies.sh

这篇关于Google AppEngine错误:“No module named flask”的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆