hasen's tech life

Twitter: @hasen

GCPのクライアントツールをインストールしようとして,"ERROR: Python 3 is not supported by the Google Cloud SDK."というエラーが出たので

# GCPのクライアントツールをインストールしようとして,"ERROR: Python 3 is not supported by the Google Cloud SDK."というエラーが出たので,対応.
# 参考: Google Cloud SDK

$ curl https://sdk.cloud.google.com | bash
> Welcome to the Google Cloud SDK!
> ERROR: Python 3 is not supported by the Google Cloud SDK. Please use a Python 2.x version that is 2.6 or greater.

$ python --version
> 3.4.2
$ pyenv versions
> system
> 2.7.9
> * 3.4.2 (set by /PATH/TO/.pyenv/version)
$ pyenv global 2.7.9
$ pyenv rehash
$ python --version
> 2.7.9

$ curl https://sdk.cloud.google.com | bash
> /Users/You/google-cloud-sdk/install.sh
> Welcome to the Google Cloud SDK!