vSphere

 View Only
  • 1.  ModuleNotFoundError: No module named 'vmware'

    Posted Sep 11, 2018 07:19 PM

    Hi,

    i tested this code ;

    import requests

    import urllib3

    from vmware.vapi.vsphere.client import create_vsphere_client

    session = requests.session()

    # Disable cert verification for demo purpose.
    # This is not recommended in a production environment.
    session.verify = False

    # Disable the secure connection warning for demo purpose.
    # This is not recommended in a production environment.
    urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning)

    # Connect to a vCenter Server using username and password
    vsphere_client = create_vsphere_client(server='10.10.10.200', username='root', password='password', session=session)

    # List all VMs inside the vCenter Server
    vsphere_client.vcenter.VM.list()

    error: ModuleNotFoundError: No module named 'vmware'

    Please how fix this error ?



  • 2.  RE: ModuleNotFoundError: No module named 'vmware'

    Broadcom Employee
    Posted Sep 12, 2018 07:15 AM

    Hi,

    This community is focused on the vSphere Client's extensibility. You'd get more answers in the general VMware vSphere™ community or the vSphere Management SDK forum.

    Tony



  • 3.  RE: ModuleNotFoundError: No module named 'vmware'

    Broadcom Employee
    Posted Sep 12, 2018 05:12 PM

    Actually, I now see this is the Automation SDK sample for python. The best forum is vSphere Automation SDK for Python Forum - VMware {code}.



  • 4.  RE: ModuleNotFoundError: No module named 'vmware'

    Posted Dec 20, 2018 09:55 AM

    Hello, Did you find the solution? I encounter the same issue :<