Bad interpreter: No such file or directory

I’m on osx 10.11.

So after messing around with a package called ‘pyenv’ to try and manage different versions of python, I somehow broke beets. When trying to import something, I get:

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

I’ve uninstalled, reinstalled, unlinked, relinked, overwritten different versions of python. It looks like homebrew doesn’t put python2.7 in /usr/local/opt/python/bin. So i’ve tried making symlinks to it there and that gives me a permission denied. I can’t figure it out.

Anybody know how to fix this? Thanks.