3
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

awscliのインストールでハマった

Posted at

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の互換ライブラリがあって、

なので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
3
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
3
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?