# cant find /opt/bin/python even though the environment path is specified

**URL:** <https://forum.ansible.com/t/cant-find-opt-bin-python-even-though-the-environment-path-is-specified/22226>\
**Category:** Ansible Project\
**Created:** [August 6, 2016, 2:02am UTC](https://forum.ansible.com/t/cant-find-opt-bin-python-even-though-the-environment-path-is-specified/22226 "2016-08-06T02:02:30Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Gallo](https://avatars.discourse-cdn.com/v4/letter/g/cab0a1/32.png) [@Gallo](https://forum.ansible.com/u/Gallo)\
**Post date:** [August 6, 2016, 2:02am UTC](https://forum.ansible.com/t/cant-find-opt-bin-python-even-though-the-environment-path-is-specified/22226/1 "2016-08-06T02:02:30Z")

</div>

Hey guys, i have a coreOS system running python and pip with toolbox

localhost ~ # cat /etc/_rele_ |grep DISTRIB\_RELEASE ; which python ;which pip  
DISTRIB\_RELEASE=1068.8.0  
/opt/bin/python  
/opt/bin/pip

$ ls -l  
total 16  
-rwxr-xr-x. 1 root root 64 Aug 6 01:05 pip  
-rwxr-xr-x. 1 root root 67 Aug 6 01:04 python

however when i try to run my playbook as follow. it tells me:

No such file or directory\r\n/opt/bin/python

This is how I am running the playbook:

ansible-playbook kubctl.yml -i hosts --ask-pass -e ‘ansible\_python\_interpreter=“/opt/bin/python”’

Any help would be appreciated. Thanks in advance…

---

<div class="post-metadata">

**Author:** ![Brian\_Coca](https://avatars.discourse-cdn.com/v4/letter/b/6de8d8/32.png) [@Brian\_Coca](https://forum.ansible.com/u/Brian_Coca)\
**Post date:** [August 8, 2016, 4:24pm UTC](https://forum.ansible.com/t/cant-find-opt-bin-python-even-though-the-environment-path-is-specified/22226/2 "2016-08-08T16:24:39Z")

</div>

You can also set ansible\_python\_interpreter as an inventory var, if you don’t want to pass it on the command line.

---

<div class="post-metadata">

**Author:** ![Gallo](https://avatars.discourse-cdn.com/v4/letter/g/cab0a1/32.png) [@Gallo](https://forum.ansible.com/u/Gallo)\
**Post date:** [August 8, 2016, 5:20pm UTC](https://forum.ansible.com/t/cant-find-opt-bin-python-even-though-the-environment-path-is-specified/22226/3 "2016-08-08T17:20:02Z")

</div>

The following helped

ansible-galaxy install defunctzombie.coreos-bootstrap

from

[https://github.com/defunctzombie/ansible-coreos-bootstrap](https://github.com/defunctzombie/ansible-coreos-bootstrap)

with a slight difference:

#ansible\_python\_interpreter=/home/core/bin/python

ansible\_python\_interpreter=/root/bin/python

I have also installed pip with toolbox. getting a new error:

TASK [defunctzombie.coreos-bootstrap : Install docker-py] \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*

fatal: [x.x.x.x]: FAILED! =\> {“changed”: false, “cmd”: “/opt/bin/pip install docker-py”, “failed”: true, “msg”: “[Errno 8] Exec format error”, “rc”: 8}

even though i can run it on the system itself:

localhost bin # /opt/bin/pip -V

pip 8.1.2 from /usr/lib/python2.7/site-packages (python 2.7)

But thats a different thread. Thanks all
