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.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With