Issues with Python

15 views
Skip to first unread message

MJP

unread,
Jun 27, 2019, 12:26:35 PM6/27/19
to Ansible Project
Hello,

I have a playbook that connects to vcenter and enables me to create VM's using a playbook.  I just upgraded Ansible to 2.8 from 2.5 yesterday and now when i run this specific playbook, i get the following error:

" "msg": "Failed to import the required Python library (requests)... Python /usr/local/opt/python@2/bin/python2.7. Please read module documentation and install in the appropriate location"

When I run the playbook with -vvv i see the error:

The full traceback is:
Traceback (most recent call last):
  File "/var/folders/nw/63rr63_d6fd8tn80q8thq08wqhrg30/T/ansible_vmware_guest_payload_pAa0vY/ansible_vmware_guest_payload.zip/ansible/module_utils/vmware.py", line 24, in <module>
    import requests
ImportError: No module named requests

I'm not quite sure what these errors mean and how to resolve it.  Nothing changed over the last 24 hours with python so i'm not sure what to do.

Any help would be appreciated

Thanks

MJP

unread,
Jun 27, 2019, 1:27:07 PM6/27/19
to Ansible Project
I figured it out, i needed to install requests and upgrade pyvomi
Reply all
Reply to author
Forward
0 new messages