Gcloud stürzte (Oserror): [Errno 2] Keine solche Datei oder Verzeichnis: '/workspace/env/bin/python3.7' 'Python

Python-Programme
Guest
 Gcloud stürzte (Oserror): [Errno 2] Keine solche Datei oder Verzeichnis: '/workspace/env/bin/python3.7' '

Post by Guest »

Beim Versuch, meinen Fastapi Python -Dienst (in App Engine) bereitzustellen, stehe ich im folgenden Fehler im folgenden Fehler ein:

Code: Select all

ERROR: gcloud crashed (OSError): [Errno 2] No such file or directory: '/workspace/env/bin/python3.7'

Ich starte die Bereitstellung/Erstellung von meinem lokalen Computer mit dem folgenden Befehl: GCLOUD -Builds reichen --konfig .
mache ich etwas falsch oder könnte es mit dem GCloud -Builder nicht stimmt? Ich habe beide mit Google Cloud SDK Version 274.0.1 und 300.0.0 ausprobiert. < /P>

Code: Select all

deploy.yaml
:

Code: Select all

steps:

# Install gcc
- name: 'python:3.7'
id: 'install-dependencies'
entrypoint: sh
args:
- -c
- apt update && apt-get -y install gcc && python -m pip install -r requirements.txt -t lib

# Run tests
- name: 'python:3.7'
id: 'test'
env:
- PYTHONPATH=lib
entrypoint: python3
args: ['-m', 'pytest']

# Deploy
- name: 'gcr.io/cloud-builders/gcloud'
args: ['app', 'deploy', '--project', '$PROJECT_ID']

timeout: '1200s'

< /code>
app.yaml
:

Code: Select all

runtime: python37
service: my-service
instance_class: F2

entrypoint: gunicorn main:app -w 4 -k uvicorn.workers.UvicornWorker
handlers:
- url: /.*
script: auto
secure: always

inbound_services:
- warmup

automatic_scaling:
min_instances: 1
min_idle_instances: 1
max_instances: 2
max_idle_instances: 1

< /code>
Build output:
...
Finished Step #1 - "test"
Starting Step #2
Step #2: Already have image (with digest): gcr.io/cloud-builders/gcloud
Step #2:
Step #2:                    ***** NOTICE *****
Step #2:
Step #2: Official `cloud-sdk` images, including multiple tagged versions across multiple
Step #2: platforms, can be found at
Step #2: https://github.com/GoogleCloudPlatform/cloud-sdk-docker.
Step #2:
Step #2: Suggested alternative images include:
Step #2:
Step #2:     gcr.io/google.com/cloudsdktool/cloud-sdk
Step #2:     gcr.io/google.com/cloudsdktool/cloud-sdk:alpine
Step #2:     gcr.io/google.com/cloudsdktool/cloud-sdk:debian_component_based
Step #2:     gcr.io/google.com/cloudsdktool/cloud-sdk:slim
Step #2:
Step #2: Please note that the `gcloud` entrypoint must be specified when using these
Step #2: images.
Step #2:
Step #2:                 ***** END OF NOTICE *****
Step #2:
Step #2: Services to deploy:
Step #2:
Step #2: descriptor:      [/workspace/app.yaml]
Step #2: source:          [/workspace]
Step #2: target project:  [my-project]
Step #2: target service:  [my-service]
Step #2: target version:  [20200710t134102]
Step #2: target url:      [https://my-service.uc.r.appspot.com]
Step #2:
Step #2:
Step #2: Do you want to continue (Y/n)?
Step #2: Beginning deployment of service [my-service]...
Step #2: Created .gcloudignore file. See `gcloud topic gcloudignore` for details.
Step #2: ERROR: gcloud crashed (OSError): [Errno 2] No such file or directory: '/workspace/env/bin/python3.7'
Step #2:
Step #2: If you would like to report this issue, please run the following command:
Step #2:   gcloud feedback
Step #2:
Step #2: To check gcloud for common problems, please run the following command:
Step #2:   gcloud info --run-diagnostics
Finished Step #2
ERROR
ERROR: build step 2 "gcr.io/cloud-builders/gcloud" failed: step exited with non-zero status: 1

Quick Reply

Change Text Case: 
   
  • Similar Topics
    Replies
    Views
    Last post