我正在尝试在 ubuntu 中安装 Google Cloud SDK,但出现错误:
[root@localhost google-cloud-sdk]# ./install.sh
Welcome to the Google Cloud SDK!
File "/home/marilu/google-cloud-sdk/bin/bootstrapping/install.py", line 182
with open(rc_path) as rc_file:
^
SyntaxError: invalid syntax [root@localhost google-cloud-sdk]#
我已经安装了 Python;这是它的样子
[root@localhost marilu]# ls -l
drwxr-xr-x 5 marilu marilu 4096 Apr 8 11:35 google-cloud-sdk
drwxrwxr-x 19 marilu marilu 4096 Apr 23 09:08 Python-2.7.6
[root@localhost marilu]#
有人可以帮助我吗?为什么会出现这个错误?
最佳答案
1 通过在您的 shell 或终端中运行以下命令来下载并安装 Google Cloud SDK:
curl https://dl.google.com/dl/cloudsdk/release/install_google_cloud_sdk.bash | bash
2 重新启动您的 shell 或终端。
3 通过运行 gcloud auth login
向 Google Cloud Platform 进行身份验证。
你试过吗?
关于python - 在 ubuntu 中安装 Google Cloud SDK 时遇到问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23247943/