LoginSignup
8
4

More than 5 years have passed since last update.

aws cli で突然の ImportError: cannot import name 'AliasedEventEmitter' エラー

Last updated at Posted at 2019-02-23

見舞われたエラー

aws configure したら


> aws configure
Traceback (most recent call last):
 File "D:\hoge\Python\Python37\Scripts\aws.cmd", line 50, in <mod
ule>
   import awscli.clidriver
 File "D:\hoge\Python\Python37\lib\site-packages\awscli\clidriver
.py", line 19, in <module>
   from botocore.hooks import AliasedEventEmitter
ImportError: cannot import name 'AliasedEventEmitter'

なんてエラーに見舞われました。
つい最近使った環境だったのでビックリ。

対処方法

aws-cli内部で使っている botocore というものがインポートできていない模様。
とりあえず aws-cli をインストールしなおしてみたら解決できました

pipをアップグレード

> python -m pip install --upgrade pip

aws-cliをアンインストール

> pip uninstall awscli

aws-cliをインストール

> pip install awscli

これで解決できました。

稼働中の環境だったらどう対処するんだろ。

8
4
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
8
4