Trellis Ansible Bad Interpreter Error on MacOS Catalina

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

Jasper Frumau

Jasper has been working with web frameworks and applications such as Laravel, Magento and his favorite CMS WordPress including Roots Trellis and Sage for more than a decade. He helps customers with web design and online marketing. Services provided are web design, ecommerce, SEO, content marketing. When Jasper is not coding, marketing a website, reading about the web or dreaming the internet of things he plays with his son, travels or run a few blocks.