kanzure / python-wmi-client-wrapper

Linux-only wrapper around wmi-client for WMI (Windows)
Other
27 stars 26 forks source link

sh.CommandNotFound: wmic #14

Open zhangjianpinghik opened 6 years ago

zhangjianpinghik commented 6 years ago

output = wmic.query("SELECT FROM Win32_Processor") Traceback (most recent call last): File "", line 1, in File "/usr/local/lib/python3.4/dist-packages/wmi_client_wrapper/wrapper.py", line 111, in query output = sh.wmic(arguments) File "/usr/local/lib/python3.4/dist-packages/sh.py", line 3349, in getattr return self.env[name] File "/usr/local/lib/python3.4/dist-packages/sh.py", line 3226, in getitem__ raise CommandNotFound(k) sh.CommandNotFound: wmic

kanzure commented 6 years ago

You'll need to install the windows management instrumentation stuff: https://docs.microsoft.com/en-us/windows/desktop/wmisdk/wmic

djloot commented 5 years ago

I got this running on a Raspberry Pi. You don't necessarily need the Microsoft's stuff, you can use the ubuntu packages