Google Cloud SDK 必须安装 Python 并且位于您的 PATH 中 [英] Google Cloud SDK must have Python installed and on your PATH

查看:78
本文介绍了Google Cloud SDK 必须安装 Python 并且位于您的 PATH 中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直在使用 Google SDK shell 为我们的网站上传文件.现在我突然收到这个错误:

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

要使用 Google Cloud SDK,您必须在 PATH 中安装 Python.作为替代方案,您还可以设置 CLOUDSDK_PYTHON 环境变量到您的 Python 可执行文件的位置.

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.

发生了什么变化?

我再次尝试下载 SDK 安装程序并得到以下结果:输出文件夹:C:\Program Files (x86)\Google\Cloud SDK下载 Google Cloud SDK 核心.提取 Google Cloud SDK 核心.创建 Google Cloud SDK bat 文件:C:\Program Files (x86)\Google\Cloud SDK\cloud_env.bat安装组件.欢迎使用 Google Cloud SDK!要使用 Google Cloud SDK,您必须在 PATH 上安装 Python.作为替代方案,您还可以设置 CLOUDSDK_PYTHON 环境变量到您的 Python 可执行文件的位置.安装失败.请帮助我,因为我需要更新我们的网站.

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.

推荐答案

您可以按照以下步骤操作:

You can follow the below steps :

步骤 1 -- 卸载所有 Python 3 及以上版本
步骤 2 -- 安装 Python 版本 - 2.x.x(我已安装 - 2.7.17)
第 3 步 -- 重新启动您的机器(非强制性)
步骤 3 -- 创建环境变量 - CLOUDSDK_PYTHON 并提供值作为 C:\Python27\python.exe
第 4 步 -- 再次运行 GoogleCloudSDKInstaller.exe

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

我认为它应该可以工作,但如果没有,则为单个用户运行 GoogleCloudSDKInstaller.exe,然后为所有用户运行

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

这篇关于Google Cloud SDK 必须安装 Python 并且位于您的 PATH 中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆