首页 > 解决方案 > 无法安装谷歌云 SDK

问题描述

我正在尝试在我的 Windows 10 机器上安装谷歌云 SDK。安装程序在以下错误处停止。SDK还安装python并在环境变量中设置自动路径对吗?在我的系统上尚未安装 python。所以在安装 SDK 之前需要在环境变量中设置 Python 路径?

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!
ERROR: gcloud failed to load: [Errno 9] Bad file descriptor
    gcloud_main = _import_gcloud_main()
    import googlecloudsdk.gcloud_main
    from googlecloudsdk.calliope import cli
    from googlecloudsdk.calliope import backend
    from googlecloudsdk.calliope import parser_extensions
    from googlecloudsdk.core.updater import update_manager
    from googlecloudsdk.core.updater import installers
    from googlecloudsdk.core import local_file_adapter
    import requests
    from . import utils
    from ._internal_utils import to_native_string
    from .compat import is_py2, builtin_str, str
    from http.cookies import Morsel
  File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap_external>", line 724, in exec_module
  File "<frozen importlib._bootstrap_external>", line 917, in get_data
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 or 3.5+ executable:
    C:\Program Files (x86)\Google\Cloud SDK\google-cloud-sdk\platform\bundledpython\python.exe
If it is not, please set the CLOUDSDK_PYTHON environment variable to point to a working Python 2.7 or 3.5+ 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:\Program Files (x86)\Google\Cloud SDK\google-cloud-sdk\\bin\bootstrapping\install.py", line 12, in <module>
    import bootstrapping
  File "C:\Program Files (x86)\Google\Cloud SDK\google-cloud-sdk\bin\bootstrapping\bootstrapping.py", line 44, in <module>
    from googlecloudsdk.core.credentials import store as c_store
  File "C:\Program Files (x86)\Google\Cloud SDK\google-cloud-sdk\lib\googlecloudsdk\core\credentials\store.py", line 40, in <module>
    from googlecloudsdk.core import requests
  File "C:\Program Files (x86)\Google\Cloud SDK\google-cloud-sdk\lib\googlecloudsdk\core\requests.py", line 26, in <module>
    from google.auth.transport import requests as google_auth_requests
  File "C:\Program Files (x86)\Google\Cloud SDK\google-cloud-sdk\lib\third_party\google\auth\transport\requests.py", line 26, in <module>
    import requests
  File "C:\Program Files (x86)\Google\Cloud SDK\google-cloud-sdk\lib\third_party\requests\__init__.py", line 112, in <module>
    from . import utils
  File "C:\Program Files (x86)\Google\Cloud SDK\google-cloud-sdk\lib\third_party\requests\utils.py", line 26, in <module>
    from ._internal_utils import to_native_string
  File "C:\Program Files (x86)\Google\Cloud SDK\google-cloud-sdk\lib\third_party\requests\_internal_utils.py", line 11, in <module>
    from .compat import is_py2, builtin_str, str
  File "C:\Program Files (x86)\Google\Cloud SDK\google-cloud-sdk\lib\third_party\requests\compat.py", line 60, in <module>
    from http.cookies import Morsel
  File "<frozen importlib._bootstrap>", line 983, in _find_and_load
  File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 677, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 724, in exec_module
  File "<frozen importlib._bootstrap_external>", line 859, in get_code
  File "<frozen importlib._bootstrap_external>", line 917, in get_data
OSError: [Errno 9] Bad file descriptor
Failed to install.

标签: pythongoogle-cloud-platformgoogle-cloud-sdk

解决方案


推荐阅读