Following the installation steps.
$ pip3 install --upgrade setuptools pip $ pip install --user ansible
After the python3 be already installed you may will be still checking the following warning which means that it still using the version 2 to execute your playbooks.
[WARNING]: Platform linux on host kind-test-local is using the discovered3362Python interpreter at /usr/bin/python, but future installation of another3363Python interpreter could change this. See https://docs.ansible.com/ansible/2.8/3364reference_appendices/interpreter_discovery.html for more information.
So, the solution is to use the `ansible_python_interpreter` attribute as global var in the hosts of your inventory as the following example.
[test] ansible_host=127.0.0.1 ansible_connection=local [all:vars] ansible_python_interpreter=/usr/bin/python3
Note that without defining the interpreter it will still using version 2 (`/usr/bin/python`).