Good day!
I need to deploy an app on Python Django with following libs:
- certifi==2017.4.17
- chardet==3.0.4
- Django==1.11.2
- httplib2==0.10.3
- idna==2.5
- oauth2==1.9.0.post1
- psycopg2==2.7.1
- pytz==2017.2
- requests==2.18.1
- urllib3==1.21.1
And I have to connect it to PostgreSQL database.
So, what environment shall I use? Standard or Flexible?
And how shall I install those libraries to the environment?
P.S.
I've tried everything: app.yaml
, appengine_config.py
, I has installed libs directly to source ('libs' folder), and adding libs to app.yaml
, and even google.appengine.ext.ndb.django_middleware.NdbDjangoMiddleware
In the end I have:
ImproperlyConfigured: Error loading psycopg2 module: dynamic module does not define init function (init_psycopg)
Your starting point should be the Choosing an App Engine Environment guide, taking into consideration all your requirements.
This requirement makes the choice pretty easy. From Connecting from App Engine:
So flexible environment it is.
This dependends on the environment you use. What you tried was the standard env way.
In the flexible environment dependencies are handled differently. From Dependencies: