Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Google AppEngine error: "No module named flask"

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.

like image 235
Davd_R Avatar asked Apr 21 '26 10:04

Davd_R


1 Answers

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
like image 101
maxcnunes Avatar answered Apr 23 '26 02:04

maxcnunes