Boto3 and AWS CLI incompatibility issue
Asked Answered
F

4

5

I executed command pip3 install awscli --upgrade --user on my MAC and got the following:

boto3 1.8.8 has requirement botocore<1.12.0,>=1.11.8, but you'll have botocore 1.12.160 which is incompatible.
boto3 1.8.8 has requirement s3transfer<0.2.0,>=0.1.10, but you'll have s3transfer 0.2.0 which is incompatible.

I'm looking for a work around.

Thanks in advance.

Fingerstall answered 4/6, 2019 at 14:26 Comment(2)
Did you try brew install awscli?Expound
Why is it trying to install boto3 1.8.8? The current version is boto3-1.9.143. Things always go crazy with installing libraries with Python. I would recommend using a Python Virtual Environment and installing your libraries in there, so that you have better control over libraries and their versions.Casillas
R
4

Just uninstall and reinstall all of the conflicting libraries together, so that pip sorts out the right versions:

For example if you have conflicts between botocore, s3transfer and boto3, just do:

pip3 uninstall botocore s3transfer boto3
pip3 install botocore s3transfer boto3

Don't forget to update your requirements.txt accordingly for next time libraries need to be installed.

pip3 freeze > requirements.txt
Rhizocarpous answered 19/1, 2021 at 21:44 Comment(3)
Pip can't uninstall multiple packages in one comma separated list (though can install like that). But uninstalling separately then installing in one line did work for the pernicious set of aiobotocore, boto3, botocore: Successfully installed aiobotocore-2.4.2 boto3-1.24.59 botocore-1.27.59Mojica
@Mojica actually it works but without comma, fixed!Minard
For me, I had to uninstall awscli using OS package manager, and then install it using pip. This seems less problematic and will be my default approach going forward.Smelser
F
1

Can you please try the following command to upgrade awscli and its modules.

sudo pip install awscli --force-reinstall --upgrade

Fairtrade answered 12/6, 2019 at 13:13 Comment(0)
O
1

Older versions of the boto3 Python package are not compatible to awscli. I ran into the same problem because I had an old boto3 version 1.10.27 installed

$ pip list | grep -E "boto3|aws"
awscli  1.17.5      
boto3   1.10.27 

The latest version of boto3 is at the moment version 1.11.5 https://pypi.org/project/boto3/ . After installing version 1.11.5 the error went away

$ pip uninstall boto3
$ pip install boto3==1.11.5
Octastyle answered 20/1, 2020 at 10:15 Comment(0)
H
0

The following command worked for me as it upgrades all the packages within the environment

conda upgrade --all -y
Hemostat answered 20/4, 2020 at 19:36 Comment(1)
This didn't upgrade my boto3 package even though I know there is a more recent version (but that version seems incompatible with the latest s3fs, so I'm stuck)Mojica

© 2022 - 2024 — McMap. All rights reserved.