# /usr/bin/python hardcoded

**URL:** <https://forum.ansible.com/t/usr-bin-python-hardcoded/13940>\
**Category:** Ansible Project\
**Created:** [November 20, 2013, 10:38am UTC](https://forum.ansible.com/t/usr-bin-python-hardcoded/13940 "2013-11-20T10:38:57Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![willthames](https://avatars.discourse-cdn.com/v4/letter/w/8dc957/32.png) [@willthames](https://forum.ansible.com/u/willthames)\
**Post date:** [November 20, 2013, 10:38am UTC](https://forum.ansible.com/t/usr-bin-python-hardcoded/13940/1 "2013-11-20T10:38:57Z")

</div>

I’ve just been bitten by running

pip install boto  
ansible-playbook ec2\_vol-playbook.yml

and it telling me that boto is not installed.

This is because I’m using homebrew’s python on OS X which is in /usr/local/bin (on my computer) but many modules are hardcoded to use /usr/bin/python

My understanding is the common idiom for python scripts is to use

#!/usr/bin/env python  
rather than  
#!/usr/bin/python

I’m happy to submit a pull request that just makes each module use env, but would be concerned that it would break something else - if there’s a simpler way to do this in Ansible then I can do that.

Will

---

<div class="post-metadata">

**Author:** ![Serge\_van\_Ginderacht](https://avatars.discourse-cdn.com/v4/letter/s/b782af/32.png) [@Serge\_van\_Ginderacht](https://forum.ansible.com/u/Serge_van_Ginderacht)\
**Post date:** [November 20, 2013, 11:54am UTC](https://forum.ansible.com/t/usr-bin-python-hardcoded/13940/2 "2013-11-20T11:54:29Z")

</div>

Please have a look at

[http://www.ansibleworks.com/docs/faq.html#how-do-i-handle-python-pathing-not-having-a-python-2-x-in-usr-bin-python-on-a-remote-machine](http://www.ansibleworks.com/docs/faq.html#how-do-i-handle-python-pathing-not-having-a-python-2-x-in-usr-bin-python-on-a-remote-machine)

Serge
