Pages

Cloud SDK is migrating to Python 3. Upgrade before January 1, 2020.
You can now update your Cloud SDK components to use Python 3.
Hi George,
The Cloud SDK now has GA support for Python 3. We encourage you to upgrade to Python 3 as soon as you can to avoid disruption.
What do I need to know?
The Python community announced that Python 2 will be deprecated on January 1, 2020. The Cloud SDK includes several components that use the Python 2 runtime. As of Cloud SDK version 274.0.0, most of these components have GA support for Python 3 as well. We're encouraging all Cloud SDK developers to upgrade to Python 3 as soon as possible.
What do I need to do?
The action required to move to Python 3 depends on which components you're using and how they are installed. Choose one of the actions below to upgrade to Python 3:
Component Python version Suggested actions
gcloud Supports Python 2.7.x.

GA support for Python 3.5+ as of 274.0.0.

Python 2.7 will not be supported from August 1, 2020.
Future releases of the Cloud SDK will use Python 3 by default. If you'd like to start using Python 3 now, follow these instructions:
  1. Run gcloud component updates to update the Cloud SDK to version 274.0.0 or later.
  2. Run gcloud topic startup and follow the upgrade instructions.
  3. Report any issues on our public issue tracker.

This will change the version of Python used by the gcloud, bq, gsutil and datalab components.
bq Supports Python 2.7.x.

GA support for Python 3.5+ as of 274.0.0.
If you want to update to Python 3 while continuing to use Python 2 for bq, you can select a Python interpreter by setting the following environment variable:

CLOUDSDK_BQ_PYTHON
gsutil Supports Python 2.7.x and 3.5+. If you want to update to Python 3 while continuing to use Python 2 for gsutil, you can select a Python interpreter by setting the following environment variable:

CLOUDSDK_GSUTIL_PYTHON
google_appengine_core Supports Python 2.7.x. This component currently requires Python 2. Please check the App Engine release notes for updates.
google_appengine_python Supports Python 2.7.x. This component currently requires Python 2. Please check the App Engine release notes for updates.
Google Cloud Client Libraries Supports Python 2.7.x and Python 3.5+.

New major versions of Python client libraries released after January 1, 2020 will only support Python 3.
Follow the instructions on the Python 2 support on Google Cloud page.
datalab Supports Python 2 and Python 3.5+. For more information, see the Cloud Datalab Documentation.
If you have questions or require assistance, please reply to this email to contact Google Cloud Support. When contacting support, please provide the following information:
  • Which version of Cloud SDK are you using?
  • Are you experiencing problems with a specific command? Eg. gcloud, bq, gsutil, etc.
  • How have you installed the tools? For example:
    • I've installed the tool on my local Windows/Mac/Linux system.
    • I'm using a tool available on a Google supplied environment.
  • What are your environment details? Include:
    • Operating system
    • Python version
Thanks for choosing Cloud SDK.
—The Google Cloud SDK Team

Was this information helpful?
YES   NO
You have received this mandatory service announcement to update you about important changes to Google Cloud Platform or your account.