Error while importing pyVim.connect

Trevor Jordy picture Trevor Jordy · Aug 7, 2018 · Viewed 7.7k times · Source

I am attempting to run the following code which I received from samples here

from __future__ import print_function
import atexit
from pyVim.connect import SmartConnectNoSSL, Disconnect
from pyVmomi import vim
from tools import cli

I am receiving the following error:

ModuleNotFoundError: No Module named 'pyVim.connect'

The packages in question are from here and were installed using:

pip install pyvmomi

Is there something wrong with how I am installing these packages?

Answer

Trevor Jordy picture Trevor Jordy · Aug 7, 2018

Looks like the code was a bit old. Importing 'pyvim' instead of 'pyVim' worked, though it seems to be named 'pyVim' on the github.