Member-only story

A good fix for a Bad Interpreter!

Emad Dehnavi
1 min readOct 1, 2020

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!

--

--

Emad Dehnavi
Emad Dehnavi

Written by Emad Dehnavi

With 8 years as a software engineer, I write about AI and technology in a simple way. My goal is to make these topics easy and interesting for everyone.

No responses yet