Python
AWS
pip
aws-cli
Python2

get-pip.py で SyntaxError

環境

# cat /etc/redhat-release
CentOS release 6.9 (Final)
# python -V
Python 2.6.6

やりたかったこと

Linux に AWS Command Line Interface をインストールします
ここの
pip のインストール

現象

# python get-pip.py
Traceback (most recent call last):
  File "get-pip.py", line 20651, in <module>
    main()
  File "get-pip.py", line 197, in main
    bootstrap(tmpdir=tmpdir)
  File "get-pip.py", line 82, in bootstrap
    import pip._internal
  File "/tmp/tmp8OYExX/pip.zip/pip/_internal/__init__.py", line 42, in <module>
  File "/tmp/tmp8OYExX/pip.zip/pip/_internal/cmdoptions.py", line 16, in <module>
  File "/tmp/tmp8OYExX/pip.zip/pip/_internal/index.py", line 536
    {str(c.version) for c in all_candidates},
                      ^
SyntaxError: invalid syntax

解決策

$ curl -O https://bootstrap.pypa.io/get-pip.py
↓
$ curl -O https://bootstrap.pypa.io/2.6/get-pip.py