I'm following this tutorial and I'm trying to develop a basic Flask app to run on the Google App Engine. I am using Windows and have followed the guide exactly at every step.
I have set up my Virtual Environment and tested if flask was in it using the
import sys
in the virtual environment interpreter and it is there. simpleJson, Werkzeug, and Jinja2 are also there. I installed them usingpip install
in the virtual environment.After checking the logs I only get a
<type 'exceptions.ImportError'>
saying:
<type 'exceptions.ImportError'>: No module named flask args = ('No module named flask',) message = 'No module named flask'
- This is my folder structure:
gae/ /app/ __init__.py models.py settings.py views.py /venv/ /Include /Lib /Scripts /flask/ /simplejson/ /werkzeug/ /jinja2/ app.yaml main.py
I have read different questions here and googled similar issues, but after trying several possible solutions, I am still not able to fix it. At this point I don't know what I am missing, I am new to flask and GAE. Any suggestion on what I am doing wrong? Thanks in advance.
This is my init.py:
from flask import Flask
import settings
app = Flask('app')
app.config.from_object('app.settings')
import views
This is my app.yaml:
application: app
version: 1
runtime: python
api_version: 1
handlers:
- url: .*
script: main.py
This is how my requirements.txt looks:
Flask==0.9
Jinja2==2.6
Werkzeug==0.8.3
simplejson==3.0.7
This is my main.py:
from google.appengine.ext.webapp.util
import run_wsgi_app from app import app
run_wsgi_app(app)