File: //snap/google-cloud-cli/394/help/man/man1/gcloud_topic_startup.1
.TH "GCLOUD_TOPIC_STARTUP" 1
.SH "NAME"
.HP
gcloud topic startup \- supplementary help for gcloud startup options
.SH "DESCRIPTION"
.SH "Choosing a Python Interpreter"
The \f5gcloud\fR CLI runs under Python. Note that \f5gcloud\fR supports Python
version 3.9\-3.14. Certain Windows and Linux installs include a bundled Python
interpreter depending on the package and architecture. Similarly, Intel\-based
Macs offer the option to install CPython as part of the main install script.
Otherwise, you must have a Python interpreter available on your system. The
\f5gcloud\fR CLI will attempt to locate an interpreter on your system PATH by
looking for the following binaries:
.RS 2m
.IP "\(bu" 2m
python3
.IP "\(bu" 2m
python
.RE
.sp
If you have a bundled Python installed, it will be preferred. To override this
you will need to set the \f5CLOUDSDK_PYTHON\fR environment variable, see below.
Other Python tools shipped in the Google Cloud CLI do not support Python 3 and
require Python 2.7.x, including:
.RS 2m
.IP "\(bu" 2m
\f5dev_appserver\fR
.RE
.sp
.SH "Bundled Python on Linux"
Linux\-based installs include a bundled Python installation on x86_64
architectures. This installation will be used by default. If you want to use a
different Python installation, set the \f5CLOUDSDK_PYTHON\fR environment
variable 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 use
by setting the \f5CLOUDSDK_PYTHON\fR environment variable. For example:
.RS 2m
# Use the python3 interpreter on your path
.RE
.RS 2m
$ export CLOUDSDK_PYTHON=python3
.RE
.RS 2m
# Use a python you have installed in a special location
.RE
.RS 2m
$ export CLOUDSDK_PYTHON=/usr/local/my\-custom\-python\-install/python
.RE
\f5gsutil\fR versions 5.0 and later support Python 3.9\-3.13. To use a different
interpreter for \f5gsutil\fR than for the other Python tools, set the
\f5CLOUDSDK_GSUTIL_PYTHON\fR environment variable to the interpreter that you
want.
\f5bq\fR versions 2.0.99 and later support Python 3.9\-3.14. To use a different
interpreter for \f5bq\fR than for the other Python tools, set the
\f5CLOUDSDK_BQ_PYTHON\fR environment variable to the interpreter that you want.
.SH "Configuring the Python Interpreter"
While not typically necessary, you can pass interpreter level arguments to the
Python running \f5gcloud\fR using the \f5CLOUDSDK_PYTHON_ARGS\fR environment
variable.
A common use case for this (which has been special\-cased) is to enable 'site
packages'. This allows Python to pick up libraries from the system ( for
example, those that may have been installed with \f5pip\fR). Site packages may
be necessary if you require certain native libraries (as is the case if you work
with service accounts using a legacy \f5.p12\fR key, for example). To enable
site packages, set \f5CLOUDSDK_PYTHON_SITEPACKAGES=1\fR. Note that enabling site
packages may cause conflicts with \f5gcloud\fR packaged libraries, depending on
what you have installed on your system.
.SH "Setting Configurations and Properties"
Your active configuration can also be set via the environment variable
\f5CLOUDSDK_ACTIVE_CONFIG_NAME\fR. This allows you to specify a certain
configuration in a given terminal session without changing the global default
configuration.
In addition to being able to set them via \f5gcloud config set\fR, each
\f5gcloud\fR property has a corresponding environment variable. They take the
form: \f5CLOUDSDK_SECTION_PROPERTY\fR. For example, if you wanted to change your
active project for just one terminal you could run:
.RS 2m
$ export CLOUDSDK_CORE_PROJECT=my\-project
.RE
For more information, see \f5gcloud topic configurations\fR.
.SH "NOTES"
These variants are also available:
.RS 2m
$ gcloud alpha topic startup
.RE
.RS 2m
$ gcloud beta topic startup
.RE