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
-
-