/etc/profile.d/google-cloud-cli.sh seems to be right
export CLOUDSDK_ROOT_DIR=/opt/google-cloud-cli
export GOOGLE_CLOUD_SDK_HOME=$CLOUDSDK_ROOT_DIR
# CLOUDSDK_ROOT_DIR # installation root dir
# CLOUDSDK_PYTHON # python interpreter path
# CLOUDSDK_GSUTIL_PYTHON # python interpreter path for gsutil
# CLOUDSDK_PYTHON_ARGS # python interpreter arguments
# CLOUDSDK_PYTHON_SITEPACKAGES # use python site packages
# CLOUDSDK_BQ_PYTHON # python interpreter for bq
# CLOUDSDK_ENCODING # python io encoding for gcloud
export CLOUDSDK_PYTHON=/opt/google-cloud-cli/platform/bundledpythonunix/bin/python3
export CLOUDSDK_GSUTIL_PYTHON=/opt/google-cloud-cli/platform/bundledpythonunix/bin/python3
export CLOUDSDK_BQ_PYTHON=/opt/google-cloud-cli/platform/bundledpythonunix/bin/python3
but the envs are wrong, I'll have a look further on my side, thanks
printenv | grep CLOUDSDK
CLOUDSDK_PYTHON_ARGS=-S -W ignore
CLOUDSDK_ROOT_DIR=/opt/google-cloud-cli
CLOUDSDK_PYTHON=/usr/bin/python
Pinned Comments
jvybihal commented on 2025-06-30 06:37 (UTC)
I did a split of the package to 3 packages:
google-cloud-cli,google-cloud-cli-bq,google-cloud-cli-gsutil. There is also package containing the bundled python for those who want it or as a dependency to the gsutil (current version 5.24 does not work with python 3.13 out-of-the-box, although 5.25 which is already available on github should). I am also testing to include other "components".If there will be interest, it's also possible to split the manpages to another package. So for those who don't want them, the install time can get faster and size significantly smaller.
I have tried not to break anyones installation, so please try to install the 3 mentioned packages and it should work the same as before.
You don't need bundled python for the gcloud to work, and I would advice to use
gsutilonly if yo really have to. The prefered way is to usegcloud storageanyway.