gcloud alpha topic startup

NAME
gcloud alpha topic startup - supplementary help for gcloud startup options
DESCRIPTION
Choosing a Python Interpreter
Thegcloud CLI runs underPython. Note thatgcloudsupports Python version 3.9-3.14. Certain Windows and Linux installs include abundled Python interpreter depending on the package and architecture. Similarly,Intel-based Macs offer the option to install CPython as part of the main installscript. Otherwise, you must have a Python interpreter available on your system.Thegcloud CLI will attempt tolocate an interpreter on your system PATH by looking for the following binaries:
  • python3
  • python

If you have a bundled Python installed, it will be preferred. To override thisyou will need to set theCLOUDSDK_PYTHON environment variable, seebelow.

Other Python tools shipped in the Google Cloud CLI do not support Python 3 andrequire Python 2.7.x, including:

  • dev_appserver
Bundled Python on Linux
Linux-based installs include a bundled Python installation on x86_64architectures. This installation will be used by default. If you want to use adifferent Python installation, set theCLOUDSDK_PYTHON environmentvariable to the absolute path to your python interpreter.

If you have multiple Python interpreters available (including a bundled python)or if you don't have one on your PATH, you can specify which interpreter to useby setting theCLOUDSDK_PYTHON environment variable. For example:

# Use the python3 interpreter on your path
exportCLOUDSDK_PYTHON=python3
# Use a python you have installed in a special location
exportCLOUDSDK_PYTHON=/usr/local/my-custom-python-install/python

gsutil versions 5.0 and later support Python 3.9-3.13. To use adifferent interpreter forgsutil than for the other Python tools,set theCLOUDSDK_GSUTIL_PYTHON environment variable to theinterpreter that you want.

bq versions 2.0.99 and later support Python 3.9-3.14. To use adifferent interpreter forbq than for the other Python tools, settheCLOUDSDK_BQ_PYTHON environment variable to the interpreter thatyou want.

Configuring the Python Interpreter
While not typically necessary, you can pass interpreter level arguments to thePython runninggcloud using theCLOUDSDK_PYTHON_ARGS environment variable.

A common use case for this (which has been special-cased) is to enable 'sitepackages'. This allows Python to pick up libraries from the system ( forexample, those that may have been installed withpip). Sitepackages may be necessary if you require certain native libraries (as is thecase if you work with service accounts using a legacy.p12 key, forexample). To enable site packages, setCLOUDSDK_PYTHON_SITEPACKAGES=1. Note that enabling site packagesmay cause conflicts withgcloudpackaged libraries, depending on what you have installed on your system.

Setting Configurations and Properties
Your active configuration can also be set via the environment variableCLOUDSDK_ACTIVE_CONFIG_NAME. This allows you to specify a certainconfiguration in a given terminal session without changing the global defaultconfiguration.

In addition to being able to set them viagcloud config set, eachgcloud property has acorresponding environment variable. They take the form:CLOUDSDK_SECTION_PROPERTY. For example, if you wanted to changeyour active project for just one terminal you could run:

exportCLOUDSDK_CORE_PROJECT=my-project

For more information, seegcloud topicconfigurations.

NOTES
This command is currently in alpha and might change without notice. If thiscommand fails with API permission errors despite specifying the correct project,you might be trying to access an API with an invitation-only early accessallowlist. These variants are also available:
gcloudtopicstartup
gcloudbetatopicstartup

Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2025-10-14 UTC.