Google Cloud SDK Installation Error: Files was unexpected at this time

Google Cloud SDK Installation Error: Files was unexpected at this time

我尝试使用此文档为 Windows 安装 Google Cloud SDK: https://cloud.google.com/functions/docs/quickstart

在 Windows 10 Pro 上安装失败。以下是日志内容:

此时文件是意外的。

安装失败

我尝试过使用安装程序安装,也尝试过使用 Powershell 安装。我还尝试先安装 Python 3.8,然后取消选中 Bundled Python 选项。什么都不行,都是上面一样的错误。

这是一个正在跟踪的已知问题here

作为解决方法,您可以执行以下操作:

1) 已卸载 python37 和 windows python 启动器。

2) 重新安装 python37 并重新添加到环境 Path 变量中(这也重新设置了我丢失的 python.exe 文件; py.exe 文件也在其中Windows python 启动器的位置)

3) 删除了所有以前的 SDK folders/files。 (我以前的副本里还有一个)

4) 重新下载 SDK 并取消选中 python 捆绑包复选框。它给了我一个警告信息,说 python 没有安装,但是在它完成后,一切都按预期工作。

  • 卸载python和google云SDK。

  • 在其他位置下载并安装 python 的稳定版本,例如 D:/python.exe

  • 设置环境变量

  • 重新安装Google cloud sdk.