Google AppEngine error: “No module named flask”

后端 未结 2 1027
爱一瞬间的悲伤
爱一瞬间的悲伤 2021-01-21 05:17

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\" successful

相关标签:
2条回答
  • 2021-01-21 05:27

    I had this exact same problem. I'm on Mac OS X Lion. I fixed the problem by moving the GoogleAppEngineLauncher.app from my desktop to the application directory. fabfile.py looks for the app there. After I moved the app to where fabfile.py was looking for it, I ran "fab deploy" and everything worked perfectly. I hope this helps.

    0 讨论(0)
  • 2021-01-21 05:37

    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
    
    0 讨论(0)
提交回复
热议问题