No Matching Distribution Found for Botocore: AWSEBCLI
byI have been ignoring the message to upgrade awsebcli tool for long time. This time I did not ignore and made an attempt to upgrade:
pip install --upgrade awsebcli
I got an error:
No matching distribution found for botocore<1.22.0,>=1.21.0 (from awsebcli)
There was also a little warning asking me to consider upgrading my existing pip installation. I upgraded pip with simple command.
pip install --upgrade pip --user
I made fresh attempt to upgrade awsebcli. I got same error telling me “No matching distribution found”
I found a suggestion in forum to try installing specific verion of awsebcli to overwrite current installation version. I did that:
sudo pip install --upgrade awsebcli botocore==1.19.63
I force upgraded to 1.19.63 which was still way higher than my existing version of awsebcli. It did installed successfully but also gave few errors:
ERROR: pip's legacy dependency resolver does not consider dependency conflicts when selecting packages. This behaviour is the source of the following dependency conflicts.
boto3 1.7.68 requires botocore<1.11.0,>=1.10.68, but you'll have botocore 1.19.63 which is incompatible.
awsebcli 3.20.2 requires botocore<1.22.0,>=1.21.0, but you'll have botocore 1.19.63 which is incompatible.
You might also like: HTTPS not working on AWS Elastic Beanstalk
It installed with errors. I verified installation by deploying my new update to beanstalk environment to see if awsebcli tool is working fine. It did not. I got this error:
File “/usr/local/bin/eb”, line 5, in
from ebcli.core.ebcore import main
File “/Library/Python/2.7/site-packages/ebcli/core/ebcore.py”, line 19, in
from ebcli.core import ebglobals, base, hooks
File “/Library/Python/2.7/site-packages/ebcli/core/hooks.py”, line 20, in
from ebcli.core import fileoperations
File “/Library/Python/2.7/site-packages/ebcli/core/fileoperations.py”, line 32, in
from json import load, JSONDecodeError
ImportError: cannot import name JSONDecodeError
Solution:
Now, I have no clue about source code behind the scene of tool but I could guess that certain required python module was not available or found. I also noticed that Python 2.7 was being mentioned in error. By default Mac use python 2.* I decided to explicitly upgrade using python3 command and find out.
python3 -m pip install –upgrade awsebcli
I ran the command and execution progress was showing promise with no funky warnings and error. Finally it did run without any warnings and error. I again verified the installation by deploying an update to beanstalk environment. No errors. Peace.
I hope this helps you.