python - 无法安装谷歌云 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.
解决方案
推荐阅读
- database - 如何使用 sybase 从 SELECT 更新同一表中的列
- javascript - 如何在数组 React 组件中使用地图打印 JSON 数据
- android - Xamarin 启动画面仅支持单个图像
- c++ - 是否有任何理由更喜欢有符号或无符号整数来表示位列表?
- c++ - 在 QTabBar 中选择标签文本
- macos - 如何以编程方式获取 MacOS 中套接字对等点的 pid?
- version-control - 我们需要在新项目中使用文件的多个版本。该文件有许多分支和标签。我们如何使用 ClearCase 管理文件?
- rust - 在另一个 crate 中查找特定“proc-macro”的所有调用
- reactjs - 使用 chart.js 加载图表并做出反应
- python - 如何打印句子中的特定单词