# venvs in Custom virtual Environment Paths return \[Errno 2\] No such file or directory:

**URL:** <https://forum.ansible.com/t/venvs-in-custom-virtual-environment-paths-return-errno-2-no-such-file-or-directory/36151>\
**Category:** AWX Project\
**Tags:** awx\
**Created:** [December 23, 2021, 10:09am UTC](https://forum.ansible.com/t/venvs-in-custom-virtual-environment-paths-return-errno-2-no-such-file-or-directory/36151 "2021-12-23T10:09:25Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![deltafiber\_thijn](https://avatars.discourse-cdn.com/v4/letter/d/4491bb/32.png) [@deltafiber\_thijn](https://forum.ansible.com/u/deltafiber_thijn)\
**Post date:** [December 23, 2021, 10:09am UTC](https://forum.ansible.com/t/venvs-in-custom-virtual-environment-paths-return-errno-2-no-such-file-or-directory/36151/1 "2021-12-23T10:09:25Z")

</div>

Hi,

I inherited an AWX installation that has in SETTINGS / SYSTEM a “Custom virtual environment paths” to /data/virtualenv  
I’m running AWX 15.0.1

AWX is running in a docker container where this path is a mounted  
/dev/mapper/vg\_data-lv\_data 51339744 20523380 28178748 43% /data/virtualenv

I am able to source these venv’s from the command line within the awx\_web and awx\_task containers.  
Whenever i try to use these venvs from an AWX template, AWX is unable to find the venv end returns a failed job with the following error message:

Traceback (most recent call last): File “/var/lib/awx/venv/awx/lib/python3.6/site-packages/awx/main/tasks.py”, line 1501, in run res = ansible\_runner.interface.run(\*\*params) File “/var/lib/awx/venv/awx/lib/python3.6/site-packages/ansible\_runner/interface.py”, line 178, in run r.run() File “/var/lib/awx/venv/awx/lib/python3.6/site-packages/ansible\_runner/runner.py”, line 179, in run use\_poll=self.config.pexpect\_use\_poll, File “/var/lib/awx/venv/awx/lib/python3.6/site-packages/pexpect/pty\_spawn.py”, line 204, in **init** self.\_spawn(command, args, preexec\_fn, dimensions) File “/var/lib/awx/venv/awx/lib/python3.6/site-packages/pexpect/pty\_spawn.py”, line 303, in \_spawn cwd=self.cwd, \*\*kwargs) File “/var/lib/awx/venv/awx/lib/python3.6/site-packages/pexpect/pty\_spawn.py”, line 314, in \_spawnpty return ptyprocess.PtyProcess.spawn(args, \*\*kwargs) File “/var/lib/awx/venv/awx/lib/python3.6/site-packages/ptyprocess/ptyprocess.py”, line 330, in spawn raise exception OSError: [Errno 2] No such file or directory: b’/data/virtualenv/ftth\_ng/bin/ansible-playbook’

If i am able to source the venv from the cli within containers, should AWX not also be able to find this?

docker exec -it awx\_task /bin/bash  
bash-4.4# source /data/virtualenv/ftth\_config\_ng/bin/activate  
(ftth\_config\_ng) bash-4.4#

docker exec -it awx\_web /bin/bash  
bash-4.4# source /data/virtualenv/ftth\_config\_ng/bin/activate  
(ftth\_config\_ng) bash-4.4#

As i am far from an AWX or docker expert, i don’t get/see where the problem lies, if someone could point me in the right direction.  
Thank you in advance.  
Kind regards,  
Thijn

---

<div class="post-metadata">

**Author:** ![Tchello\_Mello](https://avatars.discourse-cdn.com/v4/letter/t/bc79bd/32.png) [@Tchello\_Mello](https://forum.ansible.com/u/Tchello_Mello)\
**Post date:** [January 5, 2022, 8:51pm UTC](https://forum.ansible.com/t/venvs-in-custom-virtual-environment-paths-return-errno-2-no-such-file-or-directory/36151/2 "2022-01-05T20:51:36Z")

</div>

Hello,

Please note that the latest version of AWX does not support venv anymore and therefore a new concept has been added called Execution Environments.

If in your `awx-web` or `awx_task` you are able to source that venv, that is because you are sharing a common volume, however, during the execution of playbook that will be triggered by a different container due to the EE concept.

EE are containers that will trigger the `ansible-playbook` command against your playbook data.

Could you check what EE version is your AWX pulling to execute the given playbook?

In case you need to customize your EE, you can refer to the `ansible-builder` project for further information.

Best Regards,  
mmello
