# Change python to use ansible

**URL:** <https://forum.ansible.com/t/change-python-to-use-ansible/2899>\
**Category:** Get Help\
**Tags:** venv, rockylinux, python, ee, ansible-core\
**Created:** [December 14, 2023, 8:06am UTC](https://forum.ansible.com/t/change-python-to-use-ansible/2899 "2023-12-14T08:06:08Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![frit0-rb](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/frit0-rb/32/1790_2.png) [@frit0-rb](https://forum.ansible.com/u/frit0-rb)\
**Post date:** [December 14, 2023, 8:06am UTC](https://forum.ansible.com/t/change-python-to-use-ansible/2899/1 "2023-12-14T08:06:08Z")

</div>

Good afternoon,

I got to python versions installed in my server and when I upgrade ansible the version I use it was never upgraded. So I discovered there are two version of python installed.

I wonder if its possible to change the version of python is using ansible right now

ansible --version  
ansible [core 2.14.2]  
config file = /etc/ansible/ansible.cfg  
configured module search path = [‘/root/.ansible/plugins/modules’, ‘/usr/share/ansible/plugins/modules’]  
ansible python module location = /usr/lib/python3.11/site-packages/ansible  
ansible collection location = /root/.ansible/collections/ansible\_collections:/root/.ansible/collections:/usr/share/ansible/collections  
executable location = /usr/bin/ansible  
python version = 3.11.2 (main, Sep 12 2023, 00:00:00) [GCC 11.3.1 20221121 (Red Hat 11.3.1-4)] (/usr/bin/python3.11)  
jinja version = 3.1.2  
libyaml = True

Like you see is using python3.11 butn when i try to update I received this:

Requirement already satisfied: ansible in /usr/local/lib/python3.9/site-packages (8.7.0)  
Requirement already satisfied: ansible-core~=2.15.7 in /usr/local/lib/python3.9/site-packages (from ansible) (2.15.8)  
Requirement already satisfied: PyYAML\>=5.1 in /usr/lib64/python3.9/site-packages (from ansible-core~=2.15.7-\>ansible) (5.4.1)  
Requirement already satisfied: cryptography in /usr/lib64/python3.9/site-packages (from ansible-core~=2.15.7-\>ansible) (36.0.1)  
Requirement already satisfied: importlib-resources\<5.1,\>=5.0 in /usr/local/lib/python3.9/site-packages (from ansible-core~=2.15.7-\>ansible) (5.0.7)  
Requirement already satisfied: resolvelib\<1.1.0,\>=0.5.3 in /usr/lib/python3.9/site-packages (from ansible-core~=2.15.7-\>ansible) (0.5.4)  
Requirement already satisfied: jinja2\>=3.0.0 in /usr/local/lib/python3.9/site-packages (from ansible-core~=2.15.7-\>ansible) (3.1.2)  
Requirement already satisfied: packaging in /usr/lib/python3.9/site-packages (from ansible-core~=2.15.7-\>ansible) (20.9)  
Requirement already satisfied: MarkupSafe\>=2.0 in /usr/local/lib64/python3.9/site-packages (from jinja2\>=3.0.0-\>ansible-core~=2.15.7-\>ansible) (2.1.3)  
Requirement already satisfied: cffi\>=1.12 in /usr/lib64/python3.9/site-packages (from cryptography-\>ansible-core~=2.15.7-\>ansible) (1.14.5)  
Requirement already satisfied: pycparser in /usr/lib/python3.9/site-packages (from cffi\>=1.12-\>cryptography-\>ansible-core~=2.15.7-\>ansible) (2.20)  
Requirement already satisfied: pyparsing\>=2.0.2 in /usr/lib/python3.9/site-packages (from packaging-\>ansible-core~=2.15.7-\>ansible) (2.4.7)  
Requirement already satisfied: ply==3.11 in /usr/lib/python3.9/site-packages (from pycparser-\>cffi\>=1.12-\>cryptography-\>ansible-core~=2.15.7-\>ansible) (3.11

Here you can see python3.9

My OS is Rocky Linux 9.2 (Blue Onyx)

thanks

---

_[View the full topic](https://forum.ansible.com/t/change-python-to-use-ansible/2899)._
