Вопрос по python – Не удается импортировать Flask при использовании Google App Engine

3

Error: User Rate Limit ExceededError: User Rate Limit ExceededError: User Rate Limit ExceededError: User Rate Limit ExceededError: User Rate Limit Exceeded

Error: User Rate Limit ExceededNo module named flaskError: User Rate Limit Exceededimport flaskError: User Rate Limit Exceeded

Error: User Rate Limit Exceeded

Error: User Rate Limit Exceeded Kylee
Error: User Rate Limit Exceeded Nick Johnson
Error: User Rate Limit Exceeded schuppe

Ваш Ответ

4   ответа
9

Running directly with Python

python app.pypip install flask

Running with dev_appserver.py

UPDATED

Install Python

Install Python http://www.python.org/ftp/python/2.7.2/python-2.7.2.msi Click in Windows Start button and search by "Edit the system environment" and open Go to the tab Advanced and click on button "Environment Variables…" When the Environment Variables window opens, choose Path from the System variables list and click Edit… Add this ;C:\Python27;C:\Python27\Scripts at the end of the value and save

Install setuptools MS Windows installer

Choose the correct installer for you in this page http://pypi.python.org/pypi/setuptools#files( I used this one: http://pypi.python.org/packages/2.7/s/setuptools/setuptools-0.6c11.win32-py2.7.exe#md5=57e1e64f6b7c7f1d2eddfc9746bbaf20) Download the installar and Install that

Install PIP

Download PIP http://pypi.python.org/pypi/pip#downloads Extract it to any folder From that directory, type python setup.py install

Install Virtualenv

Execute pip install virtualenv Execute this mkdir c:\virtualenvs to create a folder to the Virtual Envs Execute this cd c:\virtualenvs to access that folder Execute virtualenv flaskdemo to create a virtualenv for you project Active the virtualenv c:\virtualenvs\flaskdemo\scripts\activate

Install Google App Engine SDK

Install the SDK https://developers.google.com/appengine/downloads

Create the project

Create a directory for your project Create the main of your application https://github.com/maxcnunes/flaskgaedemo/blob/master/main.py Create the configuration of your appliction for Google App Engine https://github.com/maxcnunes/flaskgaedemo/blob/master/app.yaml Create a file to let GAE initialize your application https://github.com/maxcnunes/flaskgaedemo/blob/master/initialize_gae.py

)

Install Flask to run Locally

Execute pip install flask

Install Flask to run on the GAE

Download Flask https://github.com/mitsuhiko/flask/archive/0.9.zip and extract the folder flask inside your project Download Werkzeug https://github.com/mitsuhiko/werkzeug/archive/0.8.3.zip and extract the folder werkzeug inside your project Download Jinja2 https://github.com/mitsuhiko/jinja2/archive/2.6.zip and extract the folder jinja2 inside your project Download Simple Json https://github.com/simplejson/simplejson/archive/v3.0.5.zip and extract the folder simplejson inside your project

Running the application with GAE SDK

Open Google App Engine Launcher Add a new application Run the application Click in Browse button to open your application on browser Finally click on Deploy button to deploy your application
Error: User Rate Limit Exceeded
Error: User Rate Limit Exceeded
0

ound out my silly mistake actually while refactoring my flask app I have changed appengine_config.pyError: User Rate Limit Exceeded

Error: User Rate Limit Exceededappengine_config.pyError: User Rate Limit ExceededlibError: User Rate Limit Exceeded

from google.appengine.ext import vendor

#Add any libraries installed in the "lib" folder.
vendor.add('lib')

Error: User Rate Limit Exceededappengine_config.pyError: User Rate Limit ExceededlibError: User Rate Limit Exceededappengine_config.pyError: User Rate Limit Exceeded

0

.../.virtualenvs/nimble/local/lib/python2.7/site-packages

[projectdir]/lib

dev_appserver.py [my proj dir here]

"""`appengine_config` gets loaded when starting a new application instance."""

print 'running app  config yaya!'

from google.appengine.ext import vendor
vendor.add('lib')
print 'I am the line after adding lib, it should have worked'
import os
print os.getcwd()
1

requirements.txtpip install -t lib -r requirements.txtlib

libappengine_config.pyvendor.add('lib')

Error: User Rate Limit Exceededpip install -t lib -r requirements.txtError: User Rate Limit Exceeded-rError: User Rate Limit Exceeded

Похожие вопросы