I developed a web application based on Python 3.6 and Django 2.0 and want to deploy in Google App Engine for the first time. When I tried to deploy (gcloud app deploy
) it, it did not go through and showed me the error message as follows:
(acct) C:\Users\tsjee_000\dev\acct\src>gcloud app deploy
ERROR: (gcloud.app.deploy) An error occurred while parsing file: [C:\Users\tsjee_000\dev\acct\src\app.yaml]
libraries entries are only supported by the "python27" runtime
in "C:\Users\tsjee_000\dev\acct\src\app.yaml", line 34, column 13
app.yaml:
runtime: python
api_version: 1
threadsafe: yes
env: flex
entrypoint: gunicorn -b :$PORT main:app
handlers:
- url: /static
static_dir: static/
- url: .*
script: acct.wsgi.application
libraries:
- name: MySQLdb
version: 1.2.5
Does not GAE support Python 3 and Django 2 yet? I looked for the answer and tried in many ways but it did not work.
You're mixing up standard environment app.yaml
config elements (libraries
in your case) into a flexible environment app.yaml
configuration file, which causes the error you see.
Notes:
handlers
configs, for example, also standard environment specificIn the flexible environment your dependencies are managed:
requirements.txt
file, for python dependencies, see Using Python LibrariesMaybe of interest: How to tell if a Google App Engine documentation page applies to the standard or the flexible environment
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With