'No matching distribution found for botocore<1.22.0,>=1.21.0 (from awsebcli)

CircleCi returns the following error:

No matching distribution found for botocore <1.22.0,> = 1.21.0 (from awsebcli).

enter image description here

My config.yml file installs the following dependencies:

  • sudo apt-get -y -qq update
  • sudo apt-get install python3-pip python-dev build-essential
  • sudo pip3 install --upgrade setuptools
  • sudo pip3 install awsebcli --upgrade pip3 install awscli


Solution 1:[1]

These commands work for me:

- apt-get update && apt-get install -y python-dev
- apt install python3 -y
- apt install python3-pip -y
- export LC_ALL=C.UTF-8
- pip3 install awsebcli --upgrade

Solution 2:[2]

In my case, the issue is that I have two python versions installed. So using python3 worked smoothly

python3 ./aws-elastic-beanstalk-cli-setup/scripts/ebcli_installer.py

Solution 3:[3]

This issue has been raised upstream. The suggested workaround from there is sudo pip3 install awsebcli botocore==1.19.63 --upgrade.

Solution 4:[4]

If you are working on a docker container provided by aws: FROM amazon/aws-cli the python version is: 2.7.18

In that case, if you see this error:

ERROR: After October 2020 you may experience errors when installing or updating packages. This is because pip will change the way that it resolves dependency conflicts.

I used this to fix it:

pip install awsebcli botocore==1.19.63 --upgrade --use-feature=2020-resolver

1.19.63 could be different in your case

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 ndc_lara
Solution 2 elonaire
Solution 3 antgel
Solution 4