3

I tried to install wmi in my system which is running with python2.7.12.

installed WMI using pip : pip install wmi

But it shows below error

>>> import wmi
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/local/lib/python2.7/dist-packages/wmi.py", line 88, in <module>
    from win32com.client import GetObject, Dispatch
ImportError: No module named win32com.client
>>> 

Then, I tried to install win32 python module. But its failed with "ImportError: No module named _winreg".

Full error message:

root@srv1:/home/srv1/Downloads/pywin32-220# python setup.py install
Traceback (most recent call last):
  File "setup.py", line 82, in <module>
    import _winreg
ImportError: No module named _winreg
root@srv1:/home/srv1/Downloads/pywin32-220#
KMG
  • 889
  • 2
  • 14
  • 36
  • 1
    you are installing pywin32 in linux system? – Enix Oct 19 '16 at 06:59
  • Look on this http://stackoverflow.com/questions/11133506/importerror-while-importing-winreg-module-of-python – Rahul K P Oct 19 '16 at 07:02
  • @Enix can you guide me how to install python wmi module in ubuntu machine ? . – KMG Oct 19 '16 at 07:53
  • i think wmi package could only be installed in windows system. why you need to use wmi in ubuntu? – Enix Oct 19 '16 at 08:07
  • I'm not trying to install wmi in ubuntu. I just tried to monitor my windows machines using wmi to retrieve custom metrics. I preferred python language for this. can you share your suggestion on how to use wmi module in python to monitor the windows machines/servers? – KMG Oct 19 '16 at 08:12

0 Answers0