# ansible-galaxy looks for non-existent Python interpreter

**URL:** <https://forum.ansible.com/t/ansible-galaxy-looks-for-non-existent-python-interpreter/27923>\
**Category:** Ansible Project\
**Tags:** galaxy-ng\
**Created:** [June 30, 2018, 7:51pm UTC](https://forum.ansible.com/t/ansible-galaxy-looks-for-non-existent-python-interpreter/27923 "2018-06-30T19:51:09Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Robert\_F](https://avatars.discourse-cdn.com/v4/letter/r/9d8465/32.png) [@Robert\_F](https://forum.ansible.com/u/Robert_F)\
**Post date:** [June 30, 2018, 7:51pm UTC](https://forum.ansible.com/t/ansible-galaxy-looks-for-non-existent-python-interpreter/27923/1 "2018-06-30T19:51:09Z")

</div>

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!

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/ansible/original/1X/1882d9a01da5d8996a862359b0913cc568a39b84.svg) [@system](https://forum.ansible.com/u/system)\
**Post date:** [July 2, 2018, 1:54pm UTC](https://forum.ansible.com/t/ansible-galaxy-looks-for-non-existent-python-interpreter/27923/2 "2018-07-02T13:54:59Z")

</div>

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