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.
Answer from Cees Timmerman on Stack Exchange
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.)

🌐
PyPI
pypi.org › project › pywin32
pywin32 · PyPI
For unreleased changes, you can download builds made by GitHub actions - choose any "workflow" from the main branch and download its "artifacts" Outside of a virtual environment you might want to install COM objects, services, etc. You can do this by executing: ... If you do this with normal permissions it will be global for your user (a few files will be copied to the root of your Python install and some changes made to HKCU).
      » pip install pywin32
    
Published   Jun 04, 2026
Version   312
Discussions

how to install pywin32com.client (win32com) on PyPy?
Hello, I'm a Reddit bot who's here to help people nicely format their coding questions. This makes it as easy as possible for people to read your post and help you. I think I have detected some formatting issues with your submission: Inline formatting (`my code`) used across multiple lines of code. This can mess with indentation. If I am correct, please edit the text in your post and try to follow these instructions to fix up your post's formatting. Am I misbehaving? Have a comment or suggestion? Reply to this comment or raise an issue here . More on reddit.com
🌐 r/learnpython
4
1
June 19, 2022
python - How to install win32com module in a virtualenv? - Stack Overflow
More specifically, if a virtualenv ... in a python interactive shell fails with No module named win32com.client. The same expression succeeds, however, if no virtualenv is active. When I try to install pywin32 with pip (which is how I normally install modules when a virtualenv is active), I get the error: Could not find any downloads that satisfy ... More on stackoverflow.com
🌐 stackoverflow.com
python - ImportError: No module named win32com.client - Stack Overflow
I had use use the -m flag to get this to work properly. Without it I was running into an issue where I was still getting the error ImportError: No module named win32com. ... This worked for me and has worked on several version of python where just doing pip install pywin32 did not work. More on stackoverflow.com
🌐 stackoverflow.com
python - Install win32com on MacOs and Linux - Stack Overflow
My question is simple: can I install win32com python API (pywin32 notably) on an OS that is not Windows? I have been trying, on Mac, multiple versions of pip install pywin32, all have failed. An ex... More on stackoverflow.com
🌐 stackoverflow.com
🌐
CodeSpeedy
codespeedy.com › home › how to install win32com.client in python
How to install win32com.client in Python | CodeSpeedy
December 25, 2022 - If it’s not it means it’s already installed in your Python version. Now open the command prompt on your machine and type the following command to install pywin32 using pip. ... It will download and install the package on your machine.
🌐
Reddit
reddit.com › r/learnpython › how to install pywin32com.client (win32com) on pypy?
r/learnpython on Reddit: how to install pywin32com.client (win32com) on PyPy?
June 19, 2022 -

I seem to be able to install it using a normal python installation, but whenever I try any variaton of pypy -m pip install pypiwin32 it fails because one line of code somewhere is written with python 2 print syntax instead of python 3 print syntax.

File "C:\Users\UserName\AppData\Local\Temp\pip-install-s_f16dh8\pypiwin32_cbf43cf3d1b9474da7c0471119c544fe\setup.py", line 121

print "Building pywin32", pywin32_version

^

SyntaxError: Missing parentheses in call to 'print'. Did you mean print("Building pywin32", pywin32_version)?

(Versions are Python 3.8.12 (9ef55f6fc369, Oct 24 2021, 20:12:27)

[PyPy 7.3.7 with MSC v.1929 64 bit (AMD64)] on win32)

🌐
YouTube
youtube.com › watch
How to install win32com Python library | Python Tutorial - YouTube
Buy Me a Coffee? https://www.paypal.me/jiejenn/5Your donation will support me to continue to make more tutorial videos!I am planning to create tutorials on h...
Published   June 30, 2019
Find elsewhere
🌐
SourceForge
sourceforge.net › projects › pywin32
Python for Windows Extensions download | SourceForge.net
Download Python for Windows Extensions for free. OLD project page for the Python extensions for Windows. This project has been migrated to github - please visit https://github.com/mhammond/pywin32 Please file all issues via github.
🌐
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.
🌐
Anaconda.org
anaconda.org › anaconda › pywin32
pywin32 - anaconda | Anaconda.org
June 25, 2026 - Python extensions for Windows · Overview · Files 81 · Labels 1 · Badges · Versions · 311 · To install this package, run one of the following: $conda install anaconda::pywin32 · Monthly · Downloads Updates · Version · 311 · 308 · 305 · 302 · 228 ·
🌐
Python Programming
pythonprogramming.altervista.org › how-to-install-the-win32com-module-to-make-the-computer-speak
How to install the win32com module (to make the computer speak) – python programming
July 15, 2018 - http://pythonprogramming.altervista.org/wp-content/uploads/2018/07/install_win32.mp4 · # computer windows speaks from win32com.client import Dispatch speak = Dispatch("SAPI.SpVoice") speak.Speak("Ciao") Pinterest · X · Facebook · WhatsApp · Advertisement ·
🌐
GitHub
github.com › mhammond › pywin32 › releases
Releases · mhammond/pywin32
Note that due to changes in Python there are no binary installers for version 3.10 32bit and later, so pypi is your only option there.
Author   mhammond
🌐
GitHub
github.com › mhammond › pywin32
GitHub - mhammond/pywin32: Python for Windows (pywin32) Extensions · GitHub
The folks at https://github.com/msys2/MINGW-packages/tree/master/mingw-w64-python-pywin32 are graciously keeping an updated set of patches to install pywin32 for MingGW/msys2.
Author   mhammond
Top answer
1 of 1
7

Win32COM is part of [GitHub]: mhammond/pywin32 - pywin32.
According to the (above) URL, the package is only designed to work on Win:

Python for Win32 (pywin32) extensions

So, this is Win specific (it was never intended for other OSes).

As for your question, technically you could install it on Linux, or OSX (it is possible with some manual steps), but that would make absolutely no difference, because (even if installed) it would NOT run on those platforms, as it contains (consists of) binaries (.dlls) that don't run (can't be loaded by processes) on non Win OSes.

Just looked at the comments: [MS.Docs]: Office.MessageCompose interface is available on OSX, but (most likely, if there isn't already a Python wrapper available) you'd have to write the bindings yourself (their examples are in JS).



Additional (generic) information

Some packages are only meant to work in specific conditions, based on restricting criteria like:

  • Platform(s) (OS, CPU architecture)

  • Python version(s)

  • ...

even if not enforced by the installation mechanism (meaning they can somehow end up "installed" on platforms that they don't work on).
Anyway, such restrictions are (should be) mentioned (example for PyWin32 - see the red boxes) in package's:

  • PyPI page

  • Homepage

  • Other resources (e.g.: package's doc page, if it has one)

Bottom line is that such a package will not work outside the conditions it was meant to run in (even if it can be installed), and more: when attempting to run it, will yield some error message that might not be very clear.

There are packages with such restrictions, but can be installed outside them:

  • Win:

    • ComTypes

      • Error:

        [cfati@cfati-5510-0:/mnt/e/Work/Dev/StackOverflow/q064975918]> python -c "import comtypes"
        Traceback (most recent call last):
          File "<string>", line 1, in <module>
          File "/home/cfati/.local/lib/python3.8/site-packages/comtypes/__init__.py", line 28, in <module>
            from _ctypes import COMError
        ImportError: cannot import name 'COMError' from '_ctypes' (/usr/lib/python3.8/lib-dynload/_ctypes.cpython-38-x86_64-linux-gnu.so)
        
      • Fix (improvement): [GitHub]: enthought/comtypes - Improve error message on non Win

    • WConio2

      • Error:

        [cfati@cfati-5510-0:/mnt/e/Work/Dev/StackOverflow/q064975918]> python -c "import WConio2"
        Traceback (most recent call last):
          File "<string>", line 1, in <module>
          File "/home/cfati/.local/lib/python3.8/site-packages/WConio2.py", line 125, in <module>
            from ctypes import windll
        ImportError: cannot import name 'windll' from 'ctypes' (/usr/lib/python3.8/ctypes/__init__.py)
        
      • Fix (improvement): [GitHub]: Solomoriah/WConio2 - Improve error message on non Win

Related (more or less):

  • [SO]: ImportError: No module named win32com.client (@CristiFati's answer)
🌐
Google Groups
groups.google.com › g › robotframework-users › c › _VhAY1dWgpA
installing wincom32
As the message says, download and install the win32com library from the referenced URL. Or you can delete your Python installation and download one from ActiveState that includes the necessary win32com library.
🌐
Medium
medium.com › @balaug3 › pywin32-14dc01913acb
PyWin32. You’re referring to win32com, a module… | by Balaug | Medium
January 22, 2024 - COM Automation: win32com allows Python scripts to automate applications that support the Component Object Model (COM), like Microsoft Office applications. Reading and Writing Files: It’s commonly used for reading from and writing to Excel files, manipulating Word documents, etc. Installation: You can install PyWin32, which includes win32com, using pip: