(gcloud.app.deploy)您的应用程序不满足[python37]类型运行时的所有要求

(gcloud.app.deploy)您的应用程序不满足[python37]类型运行时的所有要求,python,google-app-engine,plotly-dash,app.yaml,Python,Google App Engine,Plotly Dash,App.yaml,当我尝试将python/dash应用程序部署到GCP应用程序引擎时,我收到以下消息:错误:gcloud.app.deploy您的应用程序不满足[python37]类型运行时的所有要求。请更正错误并重试 哪些错误?这是我的app.yaml文件: runtime: python37 env: flex instance_class: F4_1G resources: cpu: 1 memory_gb: 8 disk_size_gb: 10

当我尝试将python/dash应用程序部署到GCP应用程序引擎时,我收到以下消息:错误:gcloud.app.deploy您的应用程序不满足[python37]类型运行时的所有要求。请更正错误并重试

哪些错误?这是我的app.yaml文件:

runtime: python37
env: flex

instance_class: F4_1G

resources:
  cpu: 1
  memory_gb: 8
  disk_size_gb: 10
                             
entrypoint: gunicorn -b :$PORT main:app

# handlers:
#  - url: ./assets
#  static_dir: assets
  
# https://cloud.google.com/appengine/docs/standard/python/config/appref
env_variables:
  PKL_BUCKET:  'susano-dash.appspot.com'
这是我的requirements.txt文件:

Brotli==1.0.7
cachetools==4.1.0
certifi==2020.4.5.1
chardet==3.0.4
click==7.1.2
dash==1.11.0
dash-bootstrap-components==0.10.0
dash-core-components==1.9.1
dash-html-components==1.0.3
dash-renderer==1.4.0
dash-table==4.6.2
Flask==1.1.2
Flask-Compress==1.5.0
Flask-SQLAlchemy==2.4.3
future==0.18.2
google-api-core==1.17.0
google-api-python-client==1.8.4
google-auth==1.15.0
google-auth-httplib2==0.0.3
google-auth-oauthlib==0.4.1
google-cloud==0.34.0
google-cloud-core==1.3.0
google-cloud-storage==1.29.0
google-resumable-media==0.5.1
googleapis-common-protos==1.51.0
httplib2==0.18.1
idna==2.9
itsdangerous==1.1.0
Jinja2==2.11.2
MarkupSafe==1.1.1
numpy==1.18.3
oauthlib==3.1.0
pandas==1.0.3
plotly==4.6.0
protobuf==3.12.1
pyasn1==0.4.8
pyasn1-modules==0.2.8
python-dateutil==2.8.1
pytz==2020.1
requests==2.23.0
requests-oauthlib==1.3.0
retrying==1.3.3
rsa==4.0
six==1.14.0
SQLAlchemy==1.3.17
uritemplate==3.0.1
urllib3==1.25.9
Werkzeug==1.0.1

看起来你在和环境之间混在一起。选项runtime:python37和instance_class:F4_1G属于标准环境,但在环境类型中您将其设置为env:flex

假设您要使用LundinCast已经说过的灵活环境,您必须更改app.yaml以包含runtime:python,并指定python_version:3以使用最新版本的python,同时考虑到您试图设置instance_class,我假设您希望使用自动缩放,这是默认选项。 在memory_gb选项中,根据,8是无效值,每个CPU核心需要0.9到6.5 gb之间的总内存

包含所有更改的app.yaml将类似于:

runtime: python
env: flex

runtime_config:
    python_version: 3

resources:
    cpu: 1
    memory_gb: 6
    disk_size_gb: 10
                             
entrypoint: gunicorn -b :$PORT main:app

env_variables:
  PKL_BUCKET:  'project-id.appspot.com'
此外,如果您想按照您在entrypoint选项中指定的方式使用gunicorn,则必须将其添加到requirements.txt文件中:

Brotli==1.0.7
cachetools==4.1.0
certifi==2020.4.5.1
chardet==3.0.4
click==7.1.2
dash==1.11.0
dash-bootstrap-components==0.10.0
dash-core-components==1.9.1
dash-html-components==1.0.3
dash-renderer==1.4.0
dash-table==4.6.2
Flask==1.1.2
Flask-Compress==1.5.0
Flask-SQLAlchemy==2.4.3
future==0.18.2
google-api-core==1.17.0
google-api-python-client==1.8.4
google-auth==1.15.0
google-auth-httplib2==0.0.3
google-auth-oauthlib==0.4.1
google-cloud==0.34.0
google-cloud-core==1.3.0
google-cloud-storage==1.29.0
google-resumable-media==0.5.1
googleapis-common-protos==1.51.0
httplib2==0.18.1
idna==2.9
itsdangerous==1.1.0
Jinja2==2.11.2
MarkupSafe==1.1.1
numpy==1.18.3
oauthlib==3.1.0
pandas==1.0.3
plotly==4.6.0
protobuf==3.12.1
pyasn1==0.4.8
pyasn1-modules==0.2.8
python-dateutil==2.8.1
pytz==2020.1
requests==2.23.0
requests-oauthlib==1.3.0
retrying==1.3.3
rsa==4.0
six==1.14.0
SQLAlchemy==1.3.17
uritemplate==3.0.1
urllib3==1.25.9
Werkzeug==1.0.1

看起来你在和环境之间混在一起。选项runtime:python37和instance_class:F4_1G属于标准环境,但在环境类型中您将其设置为env:flex

假设您要使用LundinCast已经说过的灵活环境,您必须更改app.yaml以包含runtime:python,并指定python_version:3以使用最新版本的python,同时考虑到您试图设置instance_class,我假设您希望使用自动缩放,这是默认选项。 在memory_gb选项中,根据,8是无效值,每个CPU核心需要0.9到6.5 gb之间的总内存

包含所有更改的app.yaml将类似于:

runtime: python
env: flex

runtime_config:
    python_version: 3

resources:
    cpu: 1
    memory_gb: 6
    disk_size_gb: 10
                             
entrypoint: gunicorn -b :$PORT main:app

env_variables:
  PKL_BUCKET:  'project-id.appspot.com'
此外,如果您想按照您在entrypoint选项中指定的方式使用gunicorn,则必须将其添加到requirements.txt文件中:

Brotli==1.0.7
cachetools==4.1.0
certifi==2020.4.5.1
chardet==3.0.4
click==7.1.2
dash==1.11.0
dash-bootstrap-components==0.10.0
dash-core-components==1.9.1
dash-html-components==1.0.3
dash-renderer==1.4.0
dash-table==4.6.2
Flask==1.1.2
Flask-Compress==1.5.0
Flask-SQLAlchemy==2.4.3
future==0.18.2
google-api-core==1.17.0
google-api-python-client==1.8.4
google-auth==1.15.0
google-auth-httplib2==0.0.3
google-auth-oauthlib==0.4.1
google-cloud==0.34.0
google-cloud-core==1.3.0
google-cloud-storage==1.29.0
google-resumable-media==0.5.1
googleapis-common-protos==1.51.0
httplib2==0.18.1
idna==2.9
itsdangerous==1.1.0
Jinja2==2.11.2
MarkupSafe==1.1.1
numpy==1.18.3
oauthlib==3.1.0
pandas==1.0.3
plotly==4.6.0
protobuf==3.12.1
pyasn1==0.4.8
pyasn1-modules==0.2.8
python-dateutil==2.8.1
pytz==2020.1
requests==2.23.0
requests-oauthlib==1.3.0
retrying==1.3.3
rsa==4.0
six==1.14.0
SQLAlchemy==1.3.17
uritemplate==3.0.1
urllib3==1.25.9
Werkzeug==1.0.1
运行时:python37不是App Engine Flex的选项。请查看更多详细信息。您需要设置runtime:python,并指定runtime\u config:python\u version:3以获得python 3.7.2 runtime:python37不是App Engine Flex的选项。请查看更多详细信息。您需要设置runtime:python,并指定runtime\u config:python\u version:3以获得python 3.7.2