# Automated custom python deployment

**URL:** <https://forum.ansible.com/t/automated-custom-python-deployment/10528>\
**Category:** Get Help\
**Tags:** python, ansible-core\
**Created:** [October 28, 2024, 8:03am UTC](https://forum.ansible.com/t/automated-custom-python-deployment/10528 "2024-10-28T08:03:29Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mykhailo\_Nesterenko](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/mykhailo_nesterenko/32/5269_2.png) [@Mykhailo\_Nesterenko](https://forum.ansible.com/u/Mykhailo_Nesterenko)\
**Post date:** [October 28, 2024, 8:03am UTC](https://forum.ansible.com/t/automated-custom-python-deployment/10528/1 "2024-10-28T08:03:29Z")

</div>

I need to run ansible in target hosts with a custom python distribution. Currently I uploaded this python distribution manually and configured `ansible_python_interpreter` ([Interpreter Discovery — Ansible Community Documentation](https://docs.ansible.com/ansible/latest/reference_appendices/interpreter_discovery.html)) to that specific path.

However, I wonder is there a way to automate this upload process using ansible?

Python distribution needs to be uploaded similar to a module code in a temp directory and then used to run other modules.

---

<div class="post-metadata">

**Author:** ![jiholland](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/jiholland/32/11273_2.png) [@jiholland](https://forum.ansible.com/u/jiholland)\
**Post date:** [October 28, 2024, 8:22am UTC](https://forum.ansible.com/t/automated-custom-python-deployment/10528/2 "2024-10-28T08:22:46Z")

</div>

Hi and welcome to the forum!  
You can use the [ansible.builtin.raw](https://docs.ansible.com/ansible/latest/collections/ansible/builtin/raw_module.html) module to install Python on a system without Python installed by default.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/ansible/original/1X/1882d9a01da5d8996a862359b0913cc568a39b84.svg) [@system](https://forum.ansible.com/u/system)\
**Post date:** [November 27, 2024, 8:23am UTC](https://forum.ansible.com/t/automated-custom-python-deployment/10528/3 "2024-11-27T08:23:03Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
