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
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.