3

Trying to execute this sample code as I need to create a vm using pyvmomi. But the execution fails at the start in from tools import tasks with the error: ImportError: cannot import name tasks.

I have tried for long but could not resolve the error. I have python 2.7 on centOS 6.4

tools module is installed but do not have tasks.py inside /usr/local/lib/python2.7/site-packages/tools/

Not sure which tools packages have to be installed. Please guide.

samrap
  • 5,595
  • 5
  • 31
  • 56
pythonuser
  • 197
  • 5
  • 10

1 Answers1

2

The module you want is this one https://github.com/vmware/pyvmomi-community-samples/tree/master/samples/tools not the module you obtain installing it through pip.

It's a sample module that's why maybe you got confused. In the link you provided probably they are using this sample module.

lapinkoira
  • 8,320
  • 9
  • 51
  • 94