Ok Roberto, I see… I’ll try to slow down a little.
This means that you’ll have a dedicated Python environment which will be totally isolated from your OS, where you’ll be able to install a set of Python packages. This virtual environment could be useful to run specific Python applications and its related dependencies. Also, you can have as many venvs as you may need. For example, if you need to run ansible-core==2.9
for legacy ansible playbooks, along with ansible-core=2.15.6
for cutting-edge ones, then you can create two different venvs for that purpose. To do so:
python -m venv ansible-2.15_venv # Creates the venv
source ansible-2.15_venv/bin/activate # Enables the venv
pip install ansible-core==2.15.6
# Do whatever you need to do with ansible, e.g.
ansible --version
ansible [core 2.15.6]
...
deactivate # Disables the venv
Later, if you wanted to use ansible==2.9
on the very same machine, you can create another venv to do so:
python -m venv ansible-2.9_venv # Creates the venv
source ansible-2.9_venv/bin/activate # Enables the venv
pip install ansible-core==2.9.x
# Do whatever you need to do with ansible 2.9, e.g.
ansible --version
ansible [core 2.9.x]
...
deactivate # Disables the venv
I suggest you to read the python venvs documentation to learn further about this feature, which I’ll tell you, will save your day more than once hehe
Not quite, the venv just affects the ansible binaries and related dependencies you got installed. The ansible code - including your inventory - will remain intact on the folder you got it stored (btw, you can enable the venv on any system directory, but you’ll have to reference its absolute path with the source
command)
That’s because you need to install the python pip packager on your system. Since I’m on Debian I’m not sure of the correct command right now for RH based distros, but I can check it later if you need to:
python -m ensurepip --default-pip
Here you will find more info about how to use pip:
PS: I just noticed you have a Hispanic name! If you feel more comfortable we can use Spanish from now on (pick your choice, I’m very used to give support in English too). Although there is not a Get Help category for the Hispanic-speaking community yet, it might be a good idea and we can ask the admins to create it What do you think @gwmngilfen @Leo ?