# How can I install additional Python packages and save changes in containers for AAP (2.4)?

**URL:** <https://forum.ansible.com/t/how-can-i-install-additional-python-packages-and-save-changes-in-containers-for-aap-2-4/40146>\
**Category:** Get Help\
**Tags:** vmware, aap\
**Created:** [February 9, 2025, 11:00pm UTC](https://forum.ansible.com/t/how-can-i-install-additional-python-packages-and-save-changes-in-containers-for-aap-2-4/40146 "2025-02-09T23:00:56Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![anon81884396](https://avatars.discourse-cdn.com/v4/letter/a/b782af/32.png) [@anon81884396](https://forum.ansible.com/u/anon81884396)\
**Post date:** [February 9, 2025, 11:12pm UTC](https://forum.ansible.com/t/how-can-i-install-additional-python-packages-and-save-changes-in-containers-for-aap-2-4/40146/2 "2025-02-09T23:12:25Z")

</div>

Add a pre-step where you install the missing package via pip in your playbook [https://docs.ansible.com/ansible/latest/collections/ansible/builtin/pip\_module.html](https://docs.ansible.com/ansible/latest/collections/ansible/builtin/pip_module.html)

The better solution would be to create an execution environment that has your dependencies pre-installed. [https://docs.ansible.com/automation-controller/latest/html/userguide/execution\_environments.html?extIdCarryOver=true&amp;sc\_cid=701f2000001Css5AAC](https://docs.ansible.com/automation-controller/latest/html/userguide/execution_environments.html?extIdCarryOver=true&amp;sc_cid=701f2000001Css5AAC)

---

_[View the full topic](https://forum.ansible.com/t/how-can-i-install-additional-python-packages-and-save-changes-in-containers-for-aap-2-4/40146)._
