Member-only story
A good fix for a Bad Interpreter!
Alright, if you read this, you probably facing to an error like this:
zsh: /usr/local/bin/aws: bad interpreter: /usr/local/opt/python@2/bin/python2.7: no such file or directory
You might see this error with a different python version, depends on what version/s installed in your machine. You might get this error when you running some awscli commands in your terminal, maybe you trying to connect to your EC2 instance using SSH or whatever.
So the error occurring ( most probably ) because you installed awscli
a very very long time ago and then upgrade your python to a new version afterwards. But enough with “Why”, let’s talk about “How” the hell we can fix this.
Here is how I fixed it, hope it fix it for you too, if it didn’t, then keep googling ;)
You need to reinstall awscli:
brew reinstall awscli
and link it so it use the right version:
brew link --overwrite awscli
Cheers!