ansible-galaxy looks for non-existent Python interpreter

I’m trying to install an Ansible role using ansible-galaxy but when I run the command it looks for a version of Python on a path that doesn’t exist:

-bash: /usr/local/bin/ansible-galaxy: /usr/local/opt/python/bin/python2.7: bad interpreter: No such file or directory

I’m using MacOS 10.x and have switched to pyenv so the path shown above no longer exists. Is there a way to tell the ansible-galaxy command to look for a Python interpreter on a different path? I looked at the ansible-galaxy documentation but didn’t see an answer.

Thanks!

The ansible shebang gets set on install, you need to reinstall ansible
in the venv.