6
votes

My System has Win 7 64bit installed when I try to execute the below code I'm facing with the error "No module named win32com.client". Can anyone help me with that?

import wmi
c = wmi.WMI()
display = c.Win32_videocontroller
print display.properties

I'm using Python 2.7Ver

Error code:

Traceback (most recent call last): File "", line 1, in import wmi File "C:\Python27\lib\site-packages\wmi.py", line 88, in from win32com.client import GetObject, Dispatch

ImportError: No module named win32com.client

4
try pip install pywin32Kobi K
Possible duplicate.ako

4 Answers

12
votes

UPDATE 2016

There is now a version of pywin32 on PyPI that can be installed with pip. It is called pypiwin32, and it installs the package using the binary wheel format.

https://pypi.python.org/pypi/pypiwin32

    pip install pypiwin32

That will work in a virtualenv, or with tox, etc.

1
votes

You can google it.Visit this link and choose the right version to install on your computer。

0
votes

Go To this link

Then use

$python setup.py install
-1
votes

As of 2020, Python 2 is unsupported.

Also, the package named pypiwin32 looks abandoned as it lags behind in version (221 vs 224) and lacks a description.

python -m pip install pywin32 works in Python 3.7.0 (v3.7.0:1bf9cc5093, Jun 27 2018, 04:06:47) [MSC v.1914 32 bit (Intel)] on win32 on Windows 10, and Python 3.8.6 (tags/v3.8.6:db45529, Sep 23 2020, 15:52:53) [MSC v.1927 64 bit (AMD64)] on win32 on Windows 10 Pro, but if it doesn't for you:

Install the pywin32 package:

  1. Start a command line with admin rights.
  2. python -m pip install pywin32
  3. python C:\Users\Cees\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\Scripts\pywin32_postinstall.py -install