awscliのインストールしようとしたところで、pythonに慣れてなかったこともあって若干ハマったのでメモ
$ sudo pip install awscli
$ aws --version
Traceback (most recent call last):
File "/usr/local/bin/aws", line 23, in <module>
sys.exit(main())
File "/usr/local/bin/aws", line 19, in main
return awscli.clidriver.main()
File "/usr/local/lib/python2.7/dist-packages/awscli/clidriver.py", line 49, in main
driver = create_clidriver()
File "/usr/local/lib/python2.7/dist-packages/awscli/clidriver.py", line 58, in create_clidriver
event_hooks=emitter)
File "/usr/local/lib/python2.7/dist-packages/awscli/plugin.py", line 44, in load_plugins
modules = _import_plugins(plugin_mapping)
File "/usr/local/lib/python2.7/dist-packages/awscli/plugin.py", line 61, in _import_plugins
module = __import__(path, fromlist=[module])
File "/usr/local/lib/python2.7/dist-packages/awscli/handlers.py", line 61, in <module>
from awscli.customizations.opsworks import initialize as opsworks_init
File "/usr/local/lib/python2.7/dist-packages/awscli/customizations/opsworks.py", line 24, in <module>
from six.moves import shlex_quote
ImportError: cannot import name shlex_quote
awsコマンドのインストールはできたけどshlex_quote
が無くて怒られているっぽい
sixっていうpython2と3の互換ライブラリがあって、
-
https://pythonhosted.org/six/
これの1.8からshlex_quote
が追加されたと。
なのでsix 1.8.0をインストールして解決
$ sudo pip install six==1.8.0
Downloading/unpacking six==1.8.0
Downloading six-1.8.0-py2.py3-none-any.whl
Installing collected packages: six
Found existing installation: six 1.5.2
Uninstalling six:
Successfully uninstalled six
Successfully installed six
Cleaning up...
$ aws --version
aws-cli/1.6.7 Python/2.7.6 Linux/3.13.0-24-generic