Help us understand the problem. What is going on with this article?

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

More than 1 year has passed since last update.

見舞われたエラー

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

これで解決できました。

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

mojogeek666
ずんだ市でITエンジニアをしています
Why not register and get more from Qiita?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
Comments
No comments
Sign up for free and join this conversation.
If you already have a Qiita account
Why do not you register as a user and use Qiita more conveniently?
You need to log in to use this function. Qiita can be used more conveniently after logging in.
You seem to be reading articles frequently this month. Qiita can be used more conveniently after logging in.
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
ユーザーは見つかりませんでした