pip install pywin32 didn't work for me but pypiwin32 did.

Answer from Mitch44 on Stack Overflow
🌐
PyPI
pypi.org › project › pywin32
pywin32 · PyPI
This is the readme for the Python for Win32 (pywin32) extensions, which provides access to many of the Windows APIs from Python, including COM support.
      » pip install pywin32
    
Published   Jun 04, 2026
Version   312
🌐
Python.org
discuss.python.org › python help
Win32com.client - Python Help - Discussions on Python.org
June 18, 2022 - Hi everyone I am trying to create a log using win32com.client module - I have installed the module with the following command - pip install pywin32 - Installation was successful. However when I tried to run the below script I get the following error. The Python Win32 extensions for NT (service, event logging) appear not to be available.
🌐
Reddit
reddit.com › r/learnpython › what do you use win32com for?
r/learnpython on Reddit: What do you use Win32com for?
June 4, 2020 -

(I've used python for a couple of years, but am no means an expert.)

I saw the Win32com package in a stackoverflow question, so I started poking around to learn more about it. It looks like you can use it to manipulate Excel and create text-to-speech. But the examples and documentation that I've found are few and far between.

I was curious to know what members of this community use Win32com for.

And are there any good tutorials/YouTube videos on how to use it?

🌐
GitHub
github.com › mhammond › pywin32 › blob › main › com › win32com › client › __init__.py
pywin32/com/win32com/client/__init__.py at main · mhammond/pywin32
# 'value' is a property so when set by pythoncom it gets any magic wrapping · # which normally happens for result objects · def _get_value(self): return self._value · · def _set_value(self, newval): self._value = _get_good_object_(newval) · def _del_value(self): del self._value · · value = property(_get_value, _set_value, _del_value) · def __repr__(self): return f"win32com.client.VARIANT({self.varianttype!r}, {self._value!r})"
Author   mhammond
Top answer
1 of 4
36
  1. Start a command line with admin rights.

  2. python -m pip install pywin32

  3. C:\Program Files\Stackless36\Scripts>python pywin32_postinstall.py -install The path C:\Program Files\Stackless36\ should be replaced with the path at which your Python version is installed.

  4. Test (admin rights optional) using python -c "import win32com" or python speak.py

    where speak.py consists of this text:

    import win32com.client
    
    speaker = win32com.client.Dispatch("SAPI.SpVoice")
    speaker.Speak("It works. Hoorah!")
    

Working fine on Python 3.6.4 Stackless 3.1b3 060516 (v3.6.4-slp:9557b2e530, Dec 21 2017, 15:23:10) [MSC v.1900 64 bit (AMD64)] on win32. Vanilla CPython hangs out here:

C:\Users\C\AppData\Local\Programs\Python\Python36-32>python.exe
Python 3.6.5 (v3.6.5:f59c0932b4, Mar 28 2018, 16:07:46) [MSC v.1900 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import win32com.client
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ModuleNotFoundError: No module named 'win32com'
>>> exit()

C:\Users\C\AppData\Local\Programs\Python\Python36-32>python.exe -m pip install pywin32
Collecting pywin32
  Cache entry deserialization failed, entry ignored
  Downloading https://files.pythonhosted.org/packages/d4/2d/b927e61c4a2b0aaaab72c8cb97cf748c319c399d804293164b0c43380d5f/pywin32-223-cp36-cp36m-win32.whl (8.3MB)
    100% |████████████████████████████████| 8.3MB 50kB/s
Installing collected packages: pywin32
Successfully installed pywin32-223
You are using pip version 9.0.3, however version 10.0.1 is available.
You should consider upgrading via the 'python -m pip install --upgrade pip' command.
2 of 4
4

Check sys.path to make sure the directory where the module is installed is in there, otherwise you have to add it (google PYTHONPATH windows for some help with that.)

Find elsewhere
🌐
WMI
timgolden.me.uk › pywin32-docs › html › com › win32com › HTML › QuickStartClientCom.html
Quick Start to Client side COM and Python
The functions GetModuleForCLSID and GetModuleForProgID both return Python module objects that you can use in your code. See the docstrings in the gencache code for more details. ... Run 'win32com\client\makepy.py' (eg, run it from the command window, or double-click on it) and a list will be presented.
🌐
Practical Business Python
pbpython.com › windows-com.html
Automating Windows Applications Using COM - Practical Business Python
This resource has many more details on how to use python on Windows for automation and other administration tasks. All of these applications start with similar imports and process for activating an application. Here is a very short example of opening up Excel: import win32com.client as win32 excel = win32.gencache.EnsureDispatch('Excel.Application') excel.Visible = True _ = input("Press ENTER to quit:") excel.Application.Quit()
🌐
Esri Community
community.esri.com › t5 › python-questions › win32-com-client › td-p › 73379
Solved: Win32.com client - Esri Community
May 31, 2017 - Can some one be kind engought to guide me though install win32com.client pkg please. Solved! Go to Solution. ... Thanks!... corrected now ... Dan, is there any reason to do this using pip instead of the windows installer at sourceforge, which adds an entry to add remove programs and all that Windows jazz? I've always pointed people to the sourceforge download. ... I clean out stuff manually before and after or through windows doing installs. Also, I still use pythonwin for an IDE on occasions and installing it took care of all the dependencies and cleanup.
🌐
Medium
medium.com › @balakrishna0106 › automating-outlook-effortless-email-retrieval-using-pythons-win32com-client-796b13746ad9
Automating Outlook: Effortless Email Retrieval using Python’s win32com.client | by Balakrishna | Medium
April 16, 2024 - # Import the win32com.client module import win32com.client # Access the Outlook Application and its MAPI (Messaging Application Programming Interface) namespace outlook_app = win32com.client.Dispatch("Outlook.Application").GetNamespace("MAPI") # Obtain the default Inbox folder (represented by the code 6) inbox = outlook_app.GetDefaultFolder(6) # Print the total number of items in the Inbox print(f"Total Inbox Items: {inbox.Items.Count}") # Access and print the subject of each email in the Inbox for message in inbox.Items: print(f"Subject of Email: {message.Subject}") # Uncomment the line below to also print…
🌐
Reddit
reddit.com › r/python › documentation for com support in pywin32
r/Python on Reddit: Documentation for COM support in pywin32
March 8, 2023 -

I'm looking for good documentation of python's WinAPI COM support.

The most conscise documentation I can find is a chapter in Mark Hammond's "Python Programming On Win32". However, it was published in 2000 and AFAIK never updated since.

The online documentation is quite brief and as dated (e.g. https://mhammond.github.io/pywin32/html/com/win32com/HTML/QuickStartClientCom.html).

Is there anything... better? Fresher?

🌐
WMI
timgolden.me.uk › pywin32-docs › contents.html
PyWin32 Documentation
ADSI Python · Active Directory · Important notes about COM currency support changes · win32com documentation index · win32com readme · Modules · adsi · ADsBuildEnumerator · ADsEnumerateNext · ADsGetLastError · ADsGetObject · ADsOpenObject · DSOP_SCOPE_INIT_INFOs ·
🌐
Mhammond
mhammond.github.io › pywin32 › html › com › win32com › HTML › docindex.html
win32com Documentation Index
A Quick Start to Client Side COM (including makepy) A Quick Start to Server Side COM · Information on generated Python files (ie, what makepy generates) An advanced VARIANT object which can give more control over parameter types · COM Record Support · A brief description of the win32com package structure ·
🌐
Cesarkallas
cesarkallas.net › arquivos › apostilas › python › doc › Python Programming on Win32_ Chapter 12 Advanced Python and COM.pdf pdf
Python Programming on Win32: Chapter 12 Advanced Python and COM
Start PythonWin, and from the Tools menu, select the item COM Makepy utility. Using Windows Explorer, locate the client subdirectory under the main win32com
🌐
GeeksforGeeks
geeksforgeeks.org › python › convert-text-speech-python-using-win32com-client
Convert Text to Speech in Python using win32com.client - GeeksforGeeks
September 29, 2022 - # Python program to convert # text to speech # import the required module from text to speech conversion import win32com.client # Calling the Dispatch method of the module which # interact with Microsoft Speech SDK to speak # the given input from the keyboard speaker = win32com.client.Dispatch("SAPI.SpVoice") while 1: print("Enter the word you want to speak it out by computer") s = input() speaker.Speak(s) # To stop the program press # CTRL + Z Input:
🌐
Anaconda.org
anaconda.org › anaconda › pywin32
pywin32 - anaconda | Anaconda.org
June 25, 2026 - Install pywin32 with Anaconda.org. Python extensions for Windows
🌐
O'Reilly
oreilly.com › library › view › python-programming-on › 1565926218 › ch12s02.html
12.2. Python and COM - Python Programming On Win32 [Book]
January 24, 2000 - As in most Python packages, win32com has a number of subpackages; win32com.client is concerned with supporting client-side COM (i.e., helping to call COM interfaces), and win32com.server is concerned with helping Python programs use server-side ...
Authors   Andy RobinsonMark Hammond
Published   2000
Pages   672
🌐
Google Groups
groups.google.com › g › comp.lang.python › c › FHvaytP1P4I
win32com.client documentation?
(Ummm, win32com.client is PART of Mark Hammond's PythonWin, now called PyWin32.) -- Tim Roberts, ti...@probo.com Providenza & Boekelheide, Inc.