-
Notifications
You must be signed in to change notification settings - Fork 4.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ImportError when running the latest awscli with Python 1.7.15rc1 #3542
Comments
Same problem on Amazon Linux 2018.03 Packages were updated today (from /var/log/yum.log): $ aws --version It was fixed by downgrading aws-cli and python27-botocore: After downgrade: |
same problem here, fixed with a downgrade: |
Apparently it seems to caused that the implementation of |
https://github.com/aws/aws-cli/commits/develop/awscli/clidriver.py Well, I already seem to be getting well with this latest version 🤔 |
We had a similar problem after doing a yum update of aws-cli and python27-botocore. It turned out we also had a pip-installed botocore that was older than the version required by the new aws-cli. Removing (or else updating) the pip version resolved the issue. This might not be the same issue as @talonx reports but perhaps may help others who commented or are reading this thread. |
Same problem here an running a yum update on the Amazon AMI. Also fixed by downgrading aws-cli.noarch and python27-botocore:
|
@talonx It looks like for some reason the versions installed aren't actually being used. Your output shows pip installing version 1.11.7 of botocore, which had the You could try this to see if the versions match up:
We've also made a few changes since v1.16.7. Are you still seeing this issue on the latest version? |
@jdkindy It looks like the same issue in my previous comment, for whatever reason, even though you've installed 1.10.82, that's not the version that's actually being used in the CLI. v1.10.82 of botocore also has the I also confirmed that if I install the CLI in a new virtualenv I'm not seeing any issues with either version affected here:
|
@jamesls test a fresh instance with the |
@jamesls but, this commit(changing name of class 'AliasedEventEmitter' to 'EventAliaser'): It seems (as previously mentioned by @masahitojp) that the root cause appears to be coming from botocore. |
The update of the botocore installed with pip works to me to solve this issue:
|
Running |
It seems to me that actually this is all that is needed: |
This issue has been automatically closed because there has been no response to our request for more information from the original author. With only the information that is currently in the issue, we don't have enough information to take action. Please reach out if you have or find the answers we need so that we can investigate further. |
So this works, but you have to remove aws-cli via yum first completely. Then when installing the awscli via pip the exact command should be: The only issue then you run into is that the upgrade/update only affects the account in question where its run first. So if you need it to be done globally, you need to look into modifying /etc/profile or profile.d or the ~/.bashrc files of each accounts on the instance in question. That said, doing all of the above still leads to breakages if you have shell scripts that are leveraged by specific apps like tomcat:
and sudo is involved. I have not yet found a way to address this yet. [Edit] Easiest path forward would be to grab the latest CLI release and use the explicit boto version stated by looking at the commit ID and installing that (plus uninstalling any previous versions you might get with any other boto packages you might have grabbed in the process). That worked for me. |
I saw a post saying boto requires higher version of awscli so that the error occurs. Upgrade the awscli first and then try it! |
|
* Changed Dockerfile to avoid creating unnecessary layers for python installation * Removed github references; Using relative references within the same repo * fixed issue with template link and bold items in template table * workers were failing due to missing pip as a dependency. Added pip and flatten the dependencies into a single execution * Applied same changes to the spotlabworker.sh * added awscli to dependencies (running into this issue with botocore update aws/aws-cli#3542) * Adding fix_yahoo_finance to the list of dependencies * docker image pointing to the fixed repo in dockerhub
smet-dk solution worked for me |
Yes, this worked for me too. |
I had similar issue. It looks like aws cli copy command is working on emr-5.17.0 but not emr-5.20.0. Downgrade the aws-cli.noarch and python27-botocore by running: "$ sudo yum downgrade aws-cli.noarch python27-botocore" did fix the problem. |
Similar problem using MRJob to copy JARs via awscli to AWS EMR 5.19 image version:
Fixed by adding the following to runner:
|
I fix it by change the format of two file: ~/.aws/config and ~/.aws/credentials |
what change you performed on ~/.aws/config and ~/.aws/credentials |
This worked for me - sudo pip-2.7 install awscli --upgrade |
Python 2.7.15rc1 on Ubuntu 18.04.1 LTS
The text was updated successfully, but these errors were encountered: