Page 1 of 2
awscli-1.14.28-5
Posted: 2018/05/12 13:52:24
by chrisdornan
I am seeing this error on systems that have updated
awscli-1.11.133-1.el7.noarch from
epel to
awscli-1.14.28-5.el7.noarch from
base:
Code: Select all
Traceback (most recent call last):
File "/usr/bin/aws", line 19, in <module>
import awscli.clidriver
File "/usr/lib/python2.7/site-packages/awscli/clidriver.py", line 25, in <module>
from botocore.history import get_global_history_recorder
ImportError: No module named history
See
https://github.com/aws/aws-cli/issues/2999 from the upstream issue tracker for context.
The solution I am adopting is to filter
awscli from
base on all of our systems. I recommend that anybody else using AWS services on CentOS check if they are affected by this.
Re: awscli-1.14.28-5
Posted: 2018/05/12 14:39:31
by avij
Upstream bug:
https://bugzilla.redhat.com/show_bug.cgi?id=1576985
You may need to
yum swap python2-s3transfer python-s3transfer to switch the packages. I have not used awscli myself, so I can't test this myself.
Re: awscli-1.14.28-5
Posted: 2018/05/12 16:30:20
by chrisdornan
Thanks, upstream discussion is most illuminating.
Until everyone (upstream/EPEL/Python Towers) start plot a path out of this mess I am inclined to just stick with EPEL for awscli.
Re: awscli-1.14.28-5
Posted: 2018/05/12 16:41:08
by chrisdornan
Just in case anybody else wants to do what I am doing, I am adding
to the [base] section of /etc/yum.repos.d/CentOS-Base.repo
Re: awscli-1.14.28-5
Posted: 2018/05/14 17:08:24
by TrevorH
This problem is caused by awscli and its dependencies now being in the base repo. Part of those will install python-s3transfer as it is a Require:. However, EPEL ships python2-s3transfer and that also satisifies the dependency but does not work.
What you need to do is update to awscli from base then
yum swap python2-s3transfer python-s3transfer . You should then be able to remove the unneeded EPEL dependencies that python2-s3transfer pulled in using
yum remove python2-botocore python2-futures python2-jmespath
The issue has now been added to the CentOS 7.5 Release Notes which you can find on
https://wiki.centos.org/Manuals/ReleaseNotes/CentOS7
Re: awscli-1.14.28-5
Posted: 2018/05/14 19:44:35
by avij
EPEL packages python-colorama and python2-rsa may also be unneeded after switching to the CentOS version of awscli. I would suggest removing the unneeded packages to prevent issues in the future. This is assuming you don't need these packages for some other non-AWS task.
Re: awscli-1.14.28-5
Posted: 2018/05/14 21:02:48
by TrevorH
You may also want to read
https://bugzilla.redhat.com/show_bug.cgi?id=1578083 for another related bug. The version of awscli from base appears to require a newer python-s3transfer than either RHEL or EPEL provide and it's necessary to edit a file and comment a line out to make it work!
Re: awscli-1.14.28-5
Posted: 2018/05/16 12:49:19
by chrisdornan
Thanks for this -- I am being bitten by 1578083 but because the working package has been taken out of EPEL I am now having to patch 1.14 as instructed.
I am astonished to see existing EPEL users being burned in this way (by others) but the assistance here has been awesome, without which this situation would be seriously stressful. Thanks!
Re: awscli-1.14.28-5
Posted: 2018/06/27 18:43:02
by zish
This worked perfectly for me. Thanks!
Re: awscli-1.14.28-5
Posted: 2018/12/20 19:02:14
by macnolock
The net result error message happened again recently, when a yum upgrade kicked python-s3transfer from 0.1.10 to 0.1.13. Tried downgrading, but I couldn't locate the older version anymore. Ended up having to ditch the repo version of awscli and do the pip version detailed at
https://docs.aws.amazon.com/cli/latest/ ... inux.html .
Posting the link above in case someone else has to do the same; i didn't have time to figure out how to rearrange the repos to be okay again