2012-05-12 125 views
3

我按照WebPutty's github页面提供的说明将自己的WebPutty分支放在GAE上。它在当地运行良好。我无法成功运行“fab deploy”(出现错误“没有名为appengine.api的模块”),所以试着只是通过执行appcfg.py更新来将它放在GAE上。不幸的是,当我访问URL时,这给了我以下错误:“No module named flask”。Google AppEngine错误:“No module named flask”

想知道如何解决任何见解/协助。

+1

请添加代码 – GalDude33

回答

2

我有这个完全相同的问题。我在Mac OS X Lion上。我通过将GoogleAppEngineLauncher.app从我的桌面移动到应用程序目录来解决问题。 fabfile.py在那里寻找应用程序。在将应用程序移至fabfile.py所需的位置后,我运行了“fab部署”,并且所有工作都完美无缺。我希望这有帮助。

3

我不知道你是否已经这样做了,但要使用GAE和python,你需要在项目中有相关的包,例如Flask,Werkzeug,Jinja2和SimpleJson。

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

# 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 

另存为install_packages_dependencies.sh并在外壳,运行后:

bash install_packages_dependencies.sh