How to set Python interpreter?

I get warning when I execute an ansible command, for example. (Macbook Pro)

$ ansible --version

/Library/Python/2.7/site-packages/cryptography/init.py:39: CryptographyDeprecationWarning: Python 2 is no longer supported by the Python core team. Support for it is now deprecated in cryptography, and will be removed in a future release.

CryptographyDeprecationWarning,

ansible 2.9.13

config file = /Users/cfouts/.ansible.cfg

configured module search path = [u’/Path/.ansible/plugins/modules’, u’/usr/share/ansible/plugins/modules’]

ansible python module location = /Path/Library/Python/2.7/lib/python/site-packages/ansible

executable location = /usr/local/bin/ansible

python version = 2.7.16 (default, Jun 5 2020, 22:59:21) [GCC 4.2.1 Compatible Apple LLVM 11.0.3 (clang-1103.0.29.20) (-macos10.15-objc-

Do I just set up the

ansible_python_interpreter = ???

in my config file for a different python library?

How did you install ansible ?

Thank you. That made me realize I did

$ pip install ansible

But once I did

$ pip3 install ansible

it’s all fixed.

Chris

May be you can use something like this.

ansible_python_interpreter: /usr/libexec/platform-python

ansible_python_interpreter: ‘{{ ansible_playbook_python }}’

Regards
Prasad

Installing ansible with pip3 did the trick.