# Recommended way for installing python modules in execution environment

**URL:** <https://forum.ansible.com/t/recommended-way-for-installing-python-modules-in-execution-environment/37163>\
**Category:** AWX Project\
**Tags:** awx-project, awx, ee\
**Created:** [September 30, 2022, 9:49pm UTC](https://forum.ansible.com/t/recommended-way-for-installing-python-modules-in-execution-environment/37163 "2022-09-30T21:49:11Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Vish](https://avatars.discourse-cdn.com/v4/letter/v/8e8cbc/32.png) [@Vish](https://forum.ansible.com/u/Vish)\
**Post date:** [September 30, 2022, 9:49pm UTC](https://forum.ansible.com/t/recommended-way-for-installing-python-modules-in-execution-environment/37163/1 "2022-09-30T21:49:11Z")

</div>

Hi ,

I have awx v21 running and created EE container and uploaded to our container registry (harbor).

I have setup EE in awx and checked option always pull.In my awx playbook i have added EE.

Question i have is :

Python module:

In future if i want to install more python modules in my EE what is recommended way? I meant do i need to create new docker image and add new modules to requirements.txt and then upload to my container registry with new tag And then edit in awx to pull EE with that tag?

Or

Add a pre task in my playbook to install python modules , which will be checked during play execution and run the install?

What is the best recommended way for installing py modules in EE.

Collections:  
For collections i can add requirements.txt with roles repo so collections is not a problem here.When ever project is updated it will install collections.

Regards  
Vish

---

<div class="post-metadata">

**Author:** ![Vish](https://avatars.discourse-cdn.com/v4/letter/v/8e8cbc/32.png) [@Vish](https://forum.ansible.com/u/Vish)\
**Post date:** [October 3, 2022, 4:38pm UTC](https://forum.ansible.com/t/recommended-way-for-installing-python-modules-in-execution-environment/37163/2 "2022-10-03T16:38:45Z")

</div>

Following up…

Regards  
Vish

---

<div class="post-metadata">

**Author:** ![AWX\_Project](https://avatars.discourse-cdn.com/v4/letter/a/eada6e/32.png) [@AWX\_Project](https://forum.ansible.com/u/AWX_Project)\
**Post date:** [October 5, 2022, 7:03pm UTC](https://forum.ansible.com/t/recommended-way-for-installing-python-modules-in-execution-environment/37163/3 "2022-10-05T19:03:14Z")

</div>

Hello,  
You can use Ansible Builder to build the execution environment. We would recommend using that tool for this purpose. You can view more information about that here: [https://ansible-builder.readthedocs.io/en/stable/](https://ansible-builder.readthedocs.io/en/stable/)

Once it is built, you can push it to a container registry. Then you will need to create an execution environment in AWX using that image location. Then you can make sure that your job templates are using that EE.
