尝试执行此示例代码,因为我需要使用pyvmomi
. 但是在开始时执行失败并from tools import tasks
出现错误: ImportError: cannot import name tasks。
我已经尝试了很长时间,但无法解决错误。我在 centOS 6.4 上有 python 2.7
工具模块已安装但tasks.py
内部没有/usr/local/lib/python2.7/site-packages/tools/
不确定必须安装哪些工具包。请指导。
您想要的模块是这个https://github.com/vmware/pyvmomi-community-samples/tree/master/samples/tools而不是您通过 pip 安装它的模块。
这是一个示例模块,这就是为什么您可能会感到困惑。在您提供的链接中,他们可能正在使用此示例模块。