I'm trying to install AWS cli (https://docs.aws.amazon.com/cli/latest/userguide/install-macos.html) in my mac (Big Sur 11.5.2).
When I try I got an error saying python 2.7 is old and I need at least python 3.6. I found that I have two python versions installed:
which python
=> /usr/bin/python
python -V
=> Python 2.7.16
which python3
=> /usr/local/bin/python3
python3 --version
=> Python 3.9.6
I have two options: 1- Uninstall python 2.7. But it seems that it is a bad idea (How to uninstall Python 2.7 on a Mac OS X 10.6.4?) 2- Keep both python versions, but how do I make AWS use python 3.9.6 instead of python 2.7?
These are the commands to install AWS cli (https://docs.aws.amazon.com/cli/latest/userguide/install-macos.html):
curl "https://s3.amazonaws.com/aws-cli/awscli-bundle.zip" -o "awscli-bundle.zip"
unzip awscli-bundle.zip
sudo ./awscli-bundle/install -i /usr/local/aws -b /usr/local/bin/aws
After sudo, this is the error:
Unsupported Python version detected: Python 2.7
To continue using this installer you must use Python 3.6 or later.