我的计算机(Mac)上的Google Cloud SDK安装过程失败,并给出了以下堆栈跟踪。
Traceback (most recent call last):
File "/Users/ttn/Desktop/google-cloud-sdk/bin/bootstrapping/install.py", line 218, in <module>
main()
File "/Users/ttn/Desktop/google-cloud-sdk/bin/bootstrapping/install.py", line 203, in main
sdk_root=bootstrapping.SDK_ROOT,
File "/Users/ttn/Desktop/google-cloud-sdk/lib/googlecloudsdk/core/platforms_install.py", line 452, in UpdateRC
completion_update, path_update, rc_path, sdk_root, host_os).Update()
File "/Users/ttn/Desktop/google-cloud-sdk/lib/googlecloudsdk/core/platforms_install.py", line 214, in Update
self.path, rc_contents, source_line=self._GetSourceLine())
File "/Users/ttn/Desktop/google-cloud-sdk/lib/googlecloudsdk/core/platforms_install.py", line 167, in _GetRcContents
filtered_contents=filtered_contents, line=line)
UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 197: ordinal not in range(128)
以下是更多详细信息:
系统的默认python版本
python -V
Python 3.6.1 :: Anaconda custom (x86_64)
用于云SDK的python版本。
echo $CLOUDSDK_PYTHON
/usr/bin/python2.7
检查gCloud命令
gcloud
-bash: gcloud: command not found
注意:这个问题可能看起来是重复的,但我尝试了一些门户上可用的解决方案,但没有对我有用。