# Unexpected behaviour when using local user python install

**URL:** <https://forum.ansible.com/t/unexpected-behaviour-when-using-local-user-python-install/11951>\
**Category:** Ansible Project\
**Tags:** ansible-project\
**Created:** [October 3, 2012, 2:30pm UTC](https://forum.ansible.com/t/unexpected-behaviour-when-using-local-user-python-install/11951 "2012-10-03T14:30:07Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Michael\_DeHaan](https://avatars.discourse-cdn.com/v4/letter/m/c4cdca/32.png) [@Michael\_DeHaan](https://forum.ansible.com/u/Michael_DeHaan)\
**Post date:** [October 3, 2012, 2:30pm UTC](https://forum.ansible.com/t/unexpected-behaviour-when-using-local-user-python-install/11951/1 "2012-10-03T14:30:07Z")

</div>

Sure, read the docs regarding the "ansible\_python\_interpreter"  
variable and it will do what you want.

---

<div class="post-metadata">

**Author:** ![Matteo\_Caprari](https://avatars.discourse-cdn.com/v4/letter/m/bbce88/32.png) [@Matteo\_Caprari](https://forum.ansible.com/u/Matteo_Caprari)\
**Post date:** [October 3, 2012, 2:50pm UTC](https://forum.ansible.com/t/unexpected-behaviour-when-using-local-user-python-install/11951/2 "2012-10-03T14:50:14Z")

</div>

Hi Michael,  
thanks for your reply.

As I noted in my first post, I’m already using ansible\_python\_interpreter, but maybe I’m doing something wrong?

mcaprari@MCAPRARIPC ~

$ cat ansible-stage-hosts  
fcpa01 ansible\_python\_interpreter=/home/fds/rms/usr/bin/python

-teo

---

<div class="post-metadata">

**Author:** ![Michael\_DeHaan](https://avatars.discourse-cdn.com/v4/letter/m/c4cdca/32.png) [@Michael\_DeHaan](https://forum.ansible.com/u/Michael_DeHaan)\
**Post date:** [October 3, 2012, 4:07pm UTC](https://forum.ansible.com/t/unexpected-behaviour-when-using-local-user-python-install/11951/3 "2012-10-03T16:07:33Z")

</div>

The underlying issue is not with ansible\_python\_interpreter, but that  
easy\_install module doesn't have a way to let you specify which  
easy\_install to use.

---

<div class="post-metadata">

**Author:** ![Matteo\_Caprari](https://avatars.discourse-cdn.com/v4/letter/m/bbce88/32.png) [@Matteo\_Caprari](https://forum.ansible.com/u/Matteo_Caprari)\
**Post date:** [October 3, 2012, 4:11pm UTC](https://forum.ansible.com/t/unexpected-behaviour-when-using-local-user-python-install/11951/4 "2012-10-03T16:11:57Z")

</div>

And the same applies to the command module, which does not allow overriding of PATH.

---

<div class="post-metadata">

**Author:** ![Michael\_DeHaan](https://avatars.discourse-cdn.com/v4/letter/m/c4cdca/32.png) [@Michael\_DeHaan](https://forum.ansible.com/u/Michael_DeHaan)\
**Post date:** [October 3, 2012, 4:37pm UTC](https://forum.ansible.com/t/unexpected-behaviour-when-using-local-user-python-install/11951/5 "2012-10-03T16:37:30Z")

</div>

Because ansible\_python\_interpreter does not set path, nor should it.

You should explore the virtualenv options if you wish to use the  
easy\_install module.
