# python interpreter from venv applied to remote hosts

**URL:** <https://forum.ansible.com/t/python-interpreter-from-venv-applied-to-remote-hosts/36979>\
**Category:** AWX Project\
**Tags:** awx\
**Created:** [August 11, 2022, 7:44pm UTC](https://forum.ansible.com/t/python-interpreter-from-venv-applied-to-remote-hosts/36979 "2022-08-11T19:44:04Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![John\_Ratliff](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/john_ratliff/32/3007_2.png) [@John\_Ratliff](https://forum.ansible.com/u/John_Ratliff)\
**Post date:** [August 11, 2022, 7:44pm UTC](https://forum.ansible.com/t/python-interpreter-from-venv-applied-to-remote-hosts/36979/1 "2022-08-11T19:44:04Z")

</div>

When I run awx in a venv for the openstacksdk package I need locally, and then delegate a task to a different host that doesn’t have this venv, the remote host still tries to make use of the python interpreter from the venv.

How do I tell awx to look for the default python interpreter?

I’m basically adding a server to the inventory and then using delegate\_to on the tasks block.

[https://pastebin.mozilla.org/JkDq0FaE](https://pastebin.mozilla.org/JkDq0FaE)

The error I get is “/bin/sh: /opt/my-envs/openstacksdk/bin/python3: No such file or directory” You probably need to set an interpreter.

---

<div class="post-metadata">

**Author:** ![John\_Ratliff](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/john_ratliff/32/3007_2.png) [@John\_Ratliff](https://forum.ansible.com/u/John_Ratliff)\
**Post date:** [August 11, 2022, 8:23pm UTC](https://forum.ansible.com/t/python-interpreter-from-venv-applied-to-remote-hosts/36979/2 "2022-08-11T20:23:30Z")

</div>

For now, I’ve added a host var ‘ansible\_python\_interpreter’ and set it to the known path of a working python3 interpreter. That seems to work.

–John
