GAE don't see gunicorn, but it is already installed

拈花ヽ惹草 提交于 2021-02-18 10:23:09

问题


I am trying to deploy Django app with Google App Engine.

My app.yaml file:

# [START runtime]
runtime: python
api_version: 1
threadsafe: true
env: flex
entrypoint: gunicorn -b :$PORT wsgi

runtime_config:
    python_version: 3.4

env_variables:
    CLOUDSQL_CONNECTION_NAME: ugram-mysql
    CLOUDSQL_USER: root

handlers:
- url: /
  script: wsgi.application

# [END runtime]

But when I run gcloud app deploy, app deploy is running (5 minutes), but I get an error:

Updating service [default]...failed.                                                                                                                                                 
ERROR: (gcloud.app.deploy) Error Response: [9] 
Application startup error:
/bin/sh: 1: exec: gunicorn: not found

But gunicorn is already installed

mysupers-beta:~$ gunicorn
usage: gunicorn [OPTIONS] [APP_MODULE]
gunicorn: error: No application module specified.

回答1:


Check if you have gunicorn==19.7.1 in your requirements.txt.




回答2:


You need to have gunicorn added to your requirements.txt file.



来源:https://stackoverflow.com/questions/43810932/gae-dont-see-gunicorn-but-it-is-already-installed

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!