我在Python中有一个基本的REST后端,我正在尝试部署到Google App Engine。但是,按照here和here的说明操作后,我的脚本无法导入部分第三方库。
我已经在lib /目录中安装了所有库,我添加了'appengine_config.py'以将lib
添加到路径中,因此应该发现库,但请求总是失败
Traceback (most recent call last):
(/base/data/home/runtimes/python27_experiment/python27_lib/versions/1/google/appengine/runtime/cgi.py:122)
File "/base/data/home/apps/myapp/myapp/Rest.py", line 2, in <module>
import flask_sqlalchemy
ImportError: No module named flask_sqlalchemy
我有这个app.yaml
runtime: python27
api_version: 1
threadsafe: false
service: feedback-backend
handlers:
- url: /*
script: Rest.py
beta_settings:
cloud_sql_instances: feedbackmysql:us-east4:feedback-mysql
skip_files:
venv/*
和这个requirements.txt
aniso8601==1.3.0
click==6.7
Flask==0.12.2
Flask-RESTful==0.3.6
Flask-Restless==0.17.0
Flask-SQLAlchemy==2.3.2
itsdangerous==0.24
Jinja2==2.9.6
MarkupSafe==1.0
mimerender==0.6.0
pep8==1.7.0
PyMySQL==0.7.11
python-dateutil==2.6.1
python-mimeparse==1.6.0
pytz==2017.2
six==1.11.0
SQLAlchemy==1.1.14
virtualenv==15.1.0
Werkzeug==0.12.2