1

I have been using the Google SDK shell to upload files for our website. Now all of a sudden I get this error:

To use the Google Cloud SDK, you must have Python installed and on your PATH. As an alternative, you may also set the CLOUDSDK_PYTHON environment variable to the location of your Python executable.

What has changed?

I tried downloading the SDK installer again and get these results: Output folder: C:\Program Files (x86)\Google\Cloud SDK Downloading Google Cloud SDK core. Extracting Google Cloud SDK core. Create Google Cloud SDK bat file: C:\Program Files (x86)\Google\Cloud SDK\cloud_env.bat Installing components. Welcome to the Google Cloud SDK! To use the Google Cloud SDK, you must have Python installed and on your PATH. As an alternative, you may also set the CLOUDSDK_PYTHON environment variable to the location of your Python executable. Failed to install. Please help me as I need to update our website.

Bill Fredette
  • 11
  • 1
  • 2
  • Does this answer your question? [Python Error on Google Cloud Install. How do I properly set the environment variable?](https://stackoverflow.com/questions/40728513/python-error-on-google-cloud-install-how-do-i-properly-set-the-environment-vari) – E. Zeytinci Dec 20 '19 at 20:55

4 Answers4

4

You can follow the below steps :

Step-1 -- Uninstall all Python version 3 and above
Step-2 -- Install Python version - 2.x.x (I have installed - 2.7.17)
Step-3 -- Restart your machine (not mandatory)
Step-3 -- Create environment variable - CLOUDSDK_PYTHON and provide value as C:\Python27\python.exe
Step-4 -- Run GoogleCloudSDKInstaller.exe again

I think it should work but if it didn't then run GoogleCloudSDKInstaller.exe for single user then all users

Kishan Bharda
  • 5,446
  • 3
  • 30
  • 57
  • This worked for me. Also the Google Cloud SDK release 274.0.0 has a bug that won't work with Windows so you may have to roll back to 273.x.x – MisterJT Dec 30 '19 at 16:10
1

Try create envionment variable named "CLOUDSDK_PYTHON" and point to "python.exe" (put your own path). In my case , i did install Python 3.7, and this solve my problem.

8columns
  • 11
  • 2
1

NO need to change verson. when you insall installation folder set C:\Python38-32 {i.e select c drive} follow the instruction you will be offered to add environment veriable tic the box and continue

that's it

0

If you have Python already installed in your machine, it must be 2.7 or 3.2-2.8 version. and in your Environment Variables Sittings: Under System Variables: Select PATHEXT and press Edit. then add " .PY " for Python.

then add your Python path to User Variables -> PATH

then the Google Cloud CLI Setup will be installd.