安装Google Cloud SDK时发生错误“ Unicode”

时间:2019-11-17 09:39:44

标签: google-cloud-sdk

我试图安装Cloud SDK,但是发生以下问题: 我已将变量CLOUDSDK_PYTHON设置为C:\Python27\python.exe

以下是日志:

Welcome to the Google Cloud SDK!
ERROR: gcloud failed to load: 'ascii' codec can't decode byte 0xab in position 9: ordinal not in range(128)
    gcloud_main = _import_gcloud_main()
    import googlecloudsdk.gcloud_main
    from googlecloudsdk.api_lib.iamcredentials import util as iamcred_util
    from googlecloudsdk.core.credentials import http as http_creds
    from googlecloudsdk.core import http
    from googlecloudsdk.core import context_aware
    files.GetHomeDir(), '.secureConnect', 'context_aware_metadata.json')
    return ExpandHomeDir('~')
    return encoding_util.Decode(os.path.expanduser(path))
    return userhome + path[i:]

This usually indicates corruption in your gcloud installation or problems with your Python interpreter.

Please verify that the following is the path to a working Python 2.7 executable:
    C:\Python27\python.exe

If it is not, please set the CLOUDSDK_PYTHON environment variable to point to a working Python 2.7 executable.

If you are still experiencing problems, please reinstall the Cloud SDK using the instructions here:
    https://cloud.google.com/sdk/
Traceback (most recent call last):
  File "C:\CloudSDK\google-cloud-sdk\\bin\bootstrapping\install.py", line 12, in <module>
    import bootstrapping
  File "C:\CloudSDK\google-cloud-sdk\bin\bootstrapping\bootstrapping.py", line 44, in <module>
    from googlecloudsdk.core.credentials import store as c_store
  File "C:\CloudSDK\google-cloud-sdk\lib\googlecloudsdk\core\credentials\store.py", line 33, in <module>
    from googlecloudsdk.core import http
  File "C:\CloudSDK\google-cloud-sdk\lib\googlecloudsdk\core\http.py", line 29, in <module>
    from googlecloudsdk.core import context_aware
  File "C:\CloudSDK\google-cloud-sdk\lib\googlecloudsdk\core\context_aware.py", line 34, in <module>
    files.GetHomeDir(), '.secureConnect', 'context_aware_metadata.json')
  File "C:\CloudSDK\google-cloud-sdk\lib\googlecloudsdk\core\util\files.py", line 1213, in GetHomeDir
    return ExpandHomeDir('~')
  File "C:\CloudSDK\google-cloud-sdk\lib\googlecloudsdk\core\util\files.py", line 1218, in ExpandHomeDir
    return encoding_util.Decode(os.path.expanduser(path))
  File "C:\Python27\lib\ntpath.py", line 311, in expanduser
    return userhome + path[i:]
UnicodeDecodeError: 'ascii' codec can't decode byte 0xab in position 9: ordinal not in range(128)

0 个答案:

没有答案