Hi,
I am having to run
export CLOUDSDK_PYTHON=/usr/local/bin/python3.12
every time I open a Terminal to run gsutil
(macOS Sonoma 14.1.2)
or I get python version warnings
How do I bake this in permanently?
thanks, david
Solved! Go to Solution.
Hi @dvh13,
Welcome to Google Cloud Community!
To permanently set the CLOUDSDK_PYTHON environment variable on macOS, add the export command export CLOUDSDK_PYTHON=/usr/local/bin/python3.12 to your shell configuration file (e.g., .bash_profile or .zshrc). Then, source the file or restart Terminal windows for the changes to take effect. This will allow you to run gsutil without manually setting the environment variable each time. Remember to verify the Python path and version, and manage potential conflicts with multiple Python installations if needed.
Hi @dvh13,
Welcome to Google Cloud Community!
To permanently set the CLOUDSDK_PYTHON environment variable on macOS, add the export command export CLOUDSDK_PYTHON=/usr/local/bin/python3.12 to your shell configuration file (e.g., .bash_profile or .zshrc). Then, source the file or restart Terminal windows for the changes to take effect. This will allow you to run gsutil without manually setting the environment variable each time. Remember to verify the Python path and version, and manage potential conflicts with multiple Python installations if needed.