Is there any way to use gcloud with python3?

后端 未结 5 1349
误落风尘
误落风尘 2021-02-05 01:29

I have a little confused about gcloud with python3

After I installed gcloud in python3 env and I tried to example Quickstart for Python in the App Engine Flexible Enviro

5条回答
  •  别那么骄傲
    2021-02-05 01:57

    As of 2019-12-17, version 274.0.0 officially supports Python 3. Release notes:

    Cloud SDK now has GA support for Python 3. Please run gcloud topic startup for:

    • Information on configuring the Python interpreter used by the Cloud SDK.
    • List of tools in the Cloud SDK that still require a Python 2.7 interpreter.
    • List of known issues with Python 3 support.

    (That command shows that dev_appserver and endpointscfg are the exceptions.)

    According to the search order, gcloud will still use Python 2 if it finds it. You can be explicit by setting CLOUDSDK_PYTHON=python3 (or similar) as an environment variable.

提交回复
热议问题