Google AppEngine Error: "No module named flask"

I follow the directions of the WebPutty github page to put my own WebPutty fork in GAE. It works fine locally. I could not run "fab deploy" successfully (I got the error "there is no module named appengine.api"), so instead I tried to enable it in GAE by simply updating appcfg.py. Unfortunately, this gives me the following error when I access the URL: "No module named flask".

It would be interesting to know how to solve.

+3
source share
2 answers

I do not know if you have already done this, but to work with GAE and python you need to have dependent packages inside your project, such as Flask, Werkzeug, Jinja2 and SimpleJson.

There is a script here that I use in 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 then run in the shell:

bash install_packages_dependencies.sh
+3
source

I had the same problem. I am on Mac OS X Lion. I fixed the problem by moving GoogleAppEngineLauncher.app from my desktop to the application directory. fabfile.py is looking for an application there. After I moved the application to where I was looking for the fabfile.py file, I ran "fab deploy" and everything worked fine. Hope this helps.

+2
source

All Articles