Since I updated gcloud sdk this morning I am getting the python deprecated warning which displays the following with each command output:
WARNING: Python 3.5-3.7 will be deprecated on August 8th, 2023. Please use Python version 3.8 and up.
If you have a compatible Python interpreter installed, you can use it by setting
the CLOUDSDK_PYTHON environment variable to point to it.
On digging sdk release notes, found that it has been added in release 431.0.0 (2023-05-16). Is there any way to disable this, I already have python 3.10 configured on my system.
Solved! Go to Solution.
Hello @anupx73 ,
Welcome to Google Cloud Community!
There is no official way to turn off the Python deprecation warning that you are encountering as a result of the most recent release of the Google Cloud SDK. Instead of the outdated Python 3.5-3.7 versions, you can set up the Cloud SDK to use your current Python 3.10 installation.
To set up your Python 3.10 interpreter for the CLOUDSDK_PYTHON environment variable, follow these steps on your terminal or command prompt:
On macOS/Linux:
export CLOUDSDK_PYTHON=/path/to/python3.10
On Windows:
set CLOUDSDK_PYTHON=C:\path\to\python3.10
Make sure to replace `/path/to/python3.10` with the actual path to your Python 3.10 interpreter.
For more detailed information, you can refer to the Google Cloud SDK documentation on Python version selection: Python Version Selection
Alternatively, if you encounter any further issues, you can refer to this Stack Overflow post which discusses the same problem: Stack Overflow Post
If the provided steps and resources do not resolve your issue, you can contact Google Cloud Support for further assistance: Google Cloud Support
Thank you.