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.

Codistan
  • 1,469
  • 1
  • 13
  • 17
  • Did you try `brew install awscli`? – bot Jun 04 '19 at 15:15
  • 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. – John Rotenstein Jun 05 '19 at 05:47

4 Answers4

2

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
Stéphane Bruckert
  • 21,706
  • 14
  • 92
  • 130
  • 1
    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.59` – yeliabsalohcin Feb 16 '23 at 13:15
  • 1
    @yeliabsalohcin actually it works but without comma, fixed! – Stéphane Bruckert Feb 16 '23 at 13:52
1

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

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

Kc Bickey
  • 1,166
  • 12
  • 11
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
0x4a6f4672
  • 27,297
  • 17
  • 103
  • 140
0

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

conda upgrade --all -y
Sincole Brans
  • 186
  • 12
  • 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) – yeliabsalohcin Jan 07 '21 at 22:20