Python 2.7 安装Google Cloud SDK时httplib2.python2出现SSLHandshakeError错误
我在运行Google Cloud SDK的安装脚本时遇到问题-这个问题已经被问过了,但是到目前为止没有明确的答案,所以欢迎任何帮助!我正在运行Python 2.7.14 这就是我得到的错误:Python 2.7 安装Google Cloud SDK时httplib2.python2出现SSLHandshakeError错误,python-2.7,httplib2,google-cloud-sdk,Python 2.7,Httplib2,Google Cloud Sdk,我在运行Google Cloud SDK的安装脚本时遇到问题-这个问题已经被问过了,但是到目前为止没有明确的答案,所以欢迎任何帮助!我正在运行Python 2.7.14 这就是我得到的错误: httplib2.python2.httplib2.SSLHandshakeError:[SSL:CERTIFICATE\u VERIFY\u FAILED]CERTIFICATE VERIFY FAILED(\u SSL.c:661) 完整堆栈跟踪是: Welcome to the Google Clou
httplib2.python2.httplib2.SSLHandshakeError:[SSL:CERTIFICATE\u VERIFY\u FAILED]CERTIFICATE VERIFY FAILED(\u SSL.c:661)
完整堆栈跟踪是:
Welcome to the Google Cloud SDK!
To help improve the quality of this product, we collect anonymized usage data
and anonymized stacktraces when crashes are encountered; additional information
is available at <https://cloud.google.com/sdk/usage-statistics>. You may choose
to opt out of this collection now (by choosing 'N' at the below prompt), or at
any time in the future by running the following command:
gcloud config set disable_usage_reporting true
Do you want to help improve the Google Cloud SDK (Y/n)? Y
Traceback (most recent call last):
File "/Users/<user>/Downloads/google-cloud-sdk/bin/bootstrapping/install.py", line 218, in <module>
main()
File "/Users/<user>/Downloads/google-cloud-sdk/bin/bootstrapping/install.py", line 196, in main
Install(pargs.override_components, pargs.additional_components)
File "/Users/<user>/Downloads/google-cloud-sdk/bin/bootstrapping/install.py", line 141, in Install
_CLI.Execute(['--quiet', 'components', 'list'])
File "/Users/<user>/Downloads/google-cloud-sdk/lib/googlecloudsdk/calliope/cli.py", line 870, in Execute
self._HandleAllErrors(exc, command_path_string, specified_arg_names)
File "/Users/<user>/Downloads/google-cloud-sdk/lib/googlecloudsdk/calliope/cli.py", line 908, in _HandleAllErrors
exceptions.HandleError(exc, command_path_string, self.__known_error_handler)
File "/Users/<user>/Downloads/google-cloud-sdk/lib/googlecloudsdk/calliope/exceptions.py", line 526, in HandleError
core_exceptions.reraise(exc)
File "/Users/<user>/Downloads/google-cloud-sdk/lib/googlecloudsdk/core/exceptions.py", line 111, in reraise
six.reraise(type(exc_value), exc_value, tb)
File "/Users/<user>/Downloads/google-cloud-sdk/lib/googlecloudsdk/calliope/cli.py", line 844, in Execute
resources = calliope_command.Run(cli=self, args=args)
File "/Users/<user>/Downloads/google-cloud-sdk/lib/googlecloudsdk/calliope/backend.py", line 756, in Run
resources = command_instance.Run(args)
File "/Users/<user>/Downloads/google-cloud-sdk/lib/surface/components/list.py", line 98, in Run
only_local_state=args.only_local_state)
File "/Users/<user>/Downloads/google-cloud-sdk/lib/googlecloudsdk/core/updater/update_manager.py", line 674, in List
to_print, current_version, latest_version = self._GetPrintListWithDiff()
File "/Users/<user>/Downloads/google-cloud-sdk/lib/googlecloudsdk/core/updater/update_manager.py", line 704, in _GetPrintListWithDiff
_, diff = self._GetStateAndDiff(command_path='components.list')
File "/Users/<user>/Downloads/google-cloud-sdk/lib/googlecloudsdk/core/updater/update_manager.py", line 600, in _GetStateAndDiff
command_path=command_path)
File "/Users/<user>/Downloads/google-cloud-sdk/lib/googlecloudsdk/core/updater/update_manager.py", line 583, in _GetLatestSnapshot
*effective_url.split(','), command_path=command_path)
File "/Users/<user>/Downloads/google-cloud-sdk/lib/googlecloudsdk/core/updater/snapshots.py", line 178, in FromURLs
for url in urls]
File "/Users/<user>/Downloads/google-cloud-sdk/lib/googlecloudsdk/core/updater/snapshots.py", line 199, in _DictFromURL
response = installers.ComponentInstaller.MakeRequest(url, command_path)
File "/Users/<user>/Downloads/google-cloud-sdk/lib/googlecloudsdk/core/updater/installers.py", line 293, in MakeRequest
return ComponentInstaller._RawRequest(req, timeout=timeout)
File "/Users/<user>/Downloads/google-cloud-sdk/lib/googlecloudsdk/core/updater/installers.py", line 337, in _RawRequest
should_retry_if=RetryIf, sleep_ms=500)
File "/Users/<user>/Downloads/google-cloud-sdk/lib/googlecloudsdk/core/util/retry.py", line 178, in RetryOnException
exceptions.reraise(exc_info[1], tb=exc_info[2])
File "/Users/<user>/Downloads/google-cloud-sdk/lib/googlecloudsdk/core/exceptions.py", line 111, in reraise
six.reraise(type(exc_value), exc_value, tb)
File "/Users/<user>/Downloads/google-cloud-sdk/lib/googlecloudsdk/core/util/retry.py", line 159, in TryFunc
return func(*args, **kwargs), None
File "/Users/<user>/Downloads/google-cloud-sdk/lib/googlecloudsdk/core/url_opener.py", line 78, in urlopen
return opener.open(req, data, timeout)
File "/usr/local/Cellar/python@2/2.7.14_3/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 429, in open
response = self._open(req, data)
File "/usr/local/Cellar/python@2/2.7.14_3/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 447, in _open
'_open', req)
File "/usr/local/Cellar/python@2/2.7.14_3/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 407, in _call_chain
result = func(*args)
File "/Users/<user>/Downloads/google-cloud-sdk/lib/googlecloudsdk/core/url_opener.py", line 63, in https_open
return self.do_open(build, req)
File "/usr/local/Cellar/python@2/2.7.14_3/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 1195, in do_open
h.request(req.get_method(), req.get_selector(), req.data, headers)
File "/usr/local/Cellar/python@2/2.7.14_3/Frameworks/Python.framework/Versions/2.7/lib/python2.7/httplib.py", line 1042, in request
self._send_request(method, url, body, headers)
File "/usr/local/Cellar/python@2/2.7.14_3/Frameworks/Python.framework/Versions/2.7/lib/python2.7/httplib.py", line 1082, in _send_request
self.endheaders(body)
File "/usr/local/Cellar/python@2/2.7.14_3/Frameworks/Python.framework/Versions/2.7/lib/python2.7/httplib.py", line 1038, in endheaders
self._send_output(message_body)
File "/usr/local/Cellar/python@2/2.7.14_3/Frameworks/Python.framework/Versions/2.7/lib/python2.7/httplib.py", line 882, in _send_output
self.send(msg)
File "/usr/local/Cellar/python@2/2.7.14_3/Frameworks/Python.framework/Versions/2.7/lib/python2.7/httplib.py", line 844, in send
self.connect()
File "/Users/<user>/Downloads/google-cloud-sdk/lib/third_party/httplib2/python2/httplib2/__init__.py", line 1120, in connect
raise SSLHandshakeError(e)
httplib2.python2.httplib2.SSLHandshakeError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:661)
欢迎使用谷歌云SDK!
为了帮助提高该产品的质量,我们收集匿名使用数据
以及遇到崩溃时的匿名堆栈跟踪;补充资料
可于。你可以选择
要立即退出此集合(通过在下面的提示中选择“N”),或
在将来的任何时候,通过运行以下命令:
gcloud config set disable\u usage\u reporting true
您是否希望帮助改进Google Cloud SDK(是/否)?Y
回溯(最近一次呼叫最后一次):
文件“/Users//Downloads/googlecloudsdk/bin/bootstrapping/install.py”,第218行,在
main()
文件“/Users//Downloads/googlecloudsdk/bin/bootstrapping/install.py”,主目录第196行
安装(组件、附加组件)
文件“/Users//Downloads/googlecloudsdk/bin/bootstrapping/install.py”,第141行,在install中
_CLI.Execute(['--quiet',components',list']))
文件“/Users//Downloads/googlecloudsdk/lib/googlecloudsdk/calliope/cli.py”,第870行,在Execute中
self.\u HandleAllErrors(exc、命令路径\u字符串、指定的参数\u名称)
文件“/Users//Downloads/google cloud sdk/lib/googlecloudsdk/calliope/cli.py”,第908行,in_HandleAllErrors
异常.HandleError(exc,命令路径字符串,self.\u已知错误\u处理程序)
文件“/Users//Downloads/googlecloudsdk/lib/googlecloudsdk/calliope/exceptions.py”,第526行,位于HandleError中
core_例外情况重新发布(exc)
文件“/Users//Downloads/googlecloudsdk/lib/googlecloudsdk/core/exceptions.py”,第111行,在reraise中
六、重放(类型(exc_值)、exc_值、tb)
文件“/Users//Downloads/googlecloudsdk/lib/googlecloudsdk/calliope/cli.py”,第844行,在Execute中
resources=calliope_command.Run(cli=self,args=args)
文件“/Users//Downloads/googlecloudsdk/lib/googlecloudsdk/calliope/backend.py”,第756行,正在运行
resources=command\u instance.Run(args)
文件“/Users//Downloads/googlecloudsdk/lib/surface/components/list.py”,第98行,正在运行
only_local_state=args.only_local_state)
文件“/Users//Downloads/googlecloudsdk/lib/googlecloudsdk/core/updater/update_manager.py”,列表第674行
要打印,当前版本,最新版本=self.\u GetPrintListWithDiff()
文件“/Users//Downloads/google cloud sdk/lib/googlecloudsdk/core/updater/update\u manager.py”,第704行,位于
_,diff=self.\u GetStateAndDiff(命令\u path='components.list')
文件“/Users//Downloads/googlecloudsdk/lib/googlecloudsdk/core/updater/update\u manager.py”,第600行,位于
命令路径=命令路径)
文件“/Users//Downloads/google cloud sdk/lib/googlecloudsdk/core/updater/update_manager.py”,第583行,在_GetLatestSnapshot中
*有效的url.split(','),命令路径=命令路径)
文件“/Users//Downloads/googlecloudsdk/lib/googlecloudsdk/core/updater/snapshots.py”,第178行,在fromURL中
用于url中的url]
文件“/Users//Downloads/googlecloudsdk/lib/googlecloudsdk/core/updater/snapshots.py”,第199行,位于
response=installers.ComponentInstaller.MakeRequest(url,命令路径)
文件“/Users//Downloads/googlecloudsdk/lib/googlecloudsdk/core/updater/installers.py”,第293行,在MakeRequest中
返回ComponentInstaller.\u RawRequest(请求,超时=超时)
文件“/Users//Downloads/googlecloudsdk/lib/googlecloudsdk/core/updater/installers.py”,第337行,在
是否应该重试(如果=重试,则睡眠时间=500)
RetryOnException中的文件“/Users//Downloads/googlecloudsdk/lib/googlecloudsdk/core/util/retry.py”,第178行
例外情况。重新发布(exc_信息[1],tb=exc_信息[2])
文件“/Users//Downloads/googlecloudsdk/lib/googlecloudsdk/core/exceptions.py”,第111行,在reraise中
六、重放(类型(exc_值)、exc_值、tb)
TryFunc中的文件“/Users//Downloads/googlecloudsdk/lib/googlecloudsdk/core/util/retry.py”,第159行
返回函数(*args,**kwargs),无
文件“/Users//Downloads/googlecloudsdk/lib/googlecloudsdk/core/url_opener.py”,第78行,在urlopen中
返回opener.open(请求、数据、超时)
文件“/usr/local/cillar”/python@2/2.7.14_3/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py”,第429行,打开
响应=自身打开(请求,数据)
文件“/usr/local/cillar”/python@2/2.7.14_3/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py”,第447行,打开
"开放",
文件“/usr/local/cillar”/python@2/2.7.14_3/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py”,第407行,在调用链中
结果=func(*args)
文件“/Users//Downloads/googlecloudsdk/lib/googlecloudsdk/core/url\u opener.py”,第63行,https\u open
返回self.do_open(构建,请求)
文件“/usr/local/cillar”/python@2/2.7.14_3/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py”,第1195行,在do_open中
h、 请求(请求获取方法(),请求获取选择器(),请求数据,标题)
文件“/usr/local/cillar”/python@2/2.7.14_3/Frameworks/Python.framework/Versions/2.7/lib/python2.7/httplib.py”,请求中的第1042行
self.\u发送请求(方法、url、正文、标题)
文件“/usr/local/cillar”/python@2/2.7.14_3/Frameworks/Python.framework/Versions/2.7/lib/python2.7/httplib.py”,发送请求中的第1082行
self.endheaders(主体)
文件“/usr/local/cillar”/python@2/2.7.14_3/Frameworks/Python.framework/Versions/2.7/lib/python2.7/httplib.py”,第1038行,在endheaders中
自发送输出(消息体)
文件“/usr/local/cillar”/python@2/2.7.14_3/Frameworks/Python.framework/Versions/2.7/lib/python2.7/httplib.py”,第882行,在发送输出中
self.send(msg)
文件“