Skip to content

Trellis Ansible Bad Interpreter Error on MacOS Catalina

By Jasper Frumau DevOps

Recently upgraded to MacOS Catalina and zsh shell. Since the upgrade it seems we have Python 3 and no longer 2.x so to work with older Trellis setups using Python 2.7 you need a fix

Bad Interpreter Error

Error we got using Ansible was a bad interpreter error. Python 2.7 is not to be found:

zsh: /usr/local/bin/ansible-vault: bad interpreter: /usr/local/opt/python@2/bin/python2.7: no such file or directory

So we did a

brew install python@2

to install Python 2 as an option besides the natively installed Python 3

Comments are closed for this post.