Getting ansible_python_interpreter error in mac local machine

428 views
Skip to first unread message

Jaydip Jadeja

unread,
Mar 8, 2021, 2:47:18 PM3/8/21
to Ansible Project
zsh shell : ansible-playbook -D -l 'local' -e "cluster=xxx1" cluster.yml
error : "msg": "Failed to import the required Python library (openshift) on MacBook-Pro.local's Python /System/Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python. Please read module documentation and install in the appropriate location. If the required library is installed, but Ansible is using the wrong Python interpreter, please consult the documentation on ansible_python_interpreter"

when I pass extra argument command : ansible-playbook -D -l 'local' -e "cluster=xxx1" xxx.yml -e ansible_python_interpreter=/usr/bin/python3 

above playbook working without error

Dick Visser

unread,
Mar 8, 2021, 4:34:17 PM3/8/21
to ansible...@googlegroups.com
I don't see any question, so I will go ahead and assume you are
surprised about the python/python3 difference.
Please read: https://docs.ansible.com/ansible/latest/reference_appendices/interpreter_discovery.html
> --
> 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/f0a35ad6-d67c-4456-8b49-d6003fcd3e84n%40googlegroups.com.



--
Dick Visser
Trust & Identity Service Operations Manager
GÉANT
Reply all
Reply to author
Forward
0 new messages