Google Cloud SDK must have Python installed and on your PATH

给你一囗甜甜゛ 提交于 2021-01-28 14:36:33

问题


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.


回答1:


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




回答2:


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




回答3:


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.



来源:https://stackoverflow.com/questions/59429636/google-cloud-sdk-must-have-python-installed-and-on-your-path

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!