How to set Python interpreter?

77 views
Skip to first unread message

zil...@gmail.com

unread,
Sep 5, 2020, 1:08:17 PM9/5/20
to Ansible Project
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?

Dick Visser

unread,
Sep 5, 2020, 2:16:53 PM9/5/20
to ansible...@googlegroups.com
How did you install ansible ?

--


You received this message because you are subscribed to the Google Groups "Ansible Project" group.


To unsubscribe from this group and stop receiving emails from it, send an email to ansible-proje...@googlegroups.com.


To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/1b49ca2b-6750-4b88-b49c-86419720905en%40googlegroups.com.


--
Sent from a mobile device - please excuse the brevity, spelling and punctuation.

zil...@gmail.com

unread,
Sep 5, 2020, 2:47:13 PM9/5/20
to Ansible Project
Thank you. That made me realize I did

$ pip install ansible

But once I did

$ pip3 install ansible

it's all fixed.

Chris

Prasad Shetty

unread,
Sep 6, 2020, 12:03:45 AM9/6/20
to ansible...@googlegroups.com
May be you can use something like this.

ansible_python_interpreter: /usr/libexec/platform-python  

ansible_python_interpreter: '{{ ansible_playbook_python }}'

Regards
Prasad 

zil...@gmail.com

unread,
Sep 6, 2020, 12:51:05 PM9/6/20
to Ansible Project
Installing ansible with pip3 did the trick.
Reply all
Reply to author
Forward
0 new messages