Skip to main content

pywin32

CI PyPI - Version PyPI - Python Version PyPI - Downloads License - PSF-2.0


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.

See CHANGES.txt for recent notable changes.

adodbapi's documentation can be found in: adodbapi/readme.txt

isapi's documentation can be found in: isapi/README.txt

Docs

The docs are a long and sad story, but there's now an online version of the PyWin32.chm helpfile (thanks @ofek!). Lots of that is very old, but some is auto-generated and current. Would love help untangling the docs!

You can get type hints, signatures and annotations from types-pywin32.

Support

Feel free to open issues for all bugs (or suspected bugs) in pywin32. pull-requests for all bugs or features are also welcome.

Type stubs currently live in typeshed. Any issue or request related to static type-checking and IntelliSense should be raised there.

However, please do not open GitHub issues for general support requests, or for problems or questions using the modules in this package - they will be closed. For such issues, please email the python-win32 mailing list - note that you must be subscribed to the list before posting.

Binaries

Binary releases are no longer supported.

Build 306 was the last with .exe installers. You really shouldn't use them, but if you really need them, find them here

Installing via PIP

You should install pywin32 via pip - eg,

python -m pip install --upgrade pywin32

There is a post-install script (see below) which should not be run inside virtual environments; it should only be run in "global" installs.

For unreleased changes, you can download builds made by github actions - choose any "workflow" from the main branch and download its "artifacts"

Installing globally

Outside of a virtual environment you might want to install COM objects, services, etc. You can do this by executing:

python -m pywin32_postinstall -install

or (shorter but you don't have control over which python environment is used)

pywin32_postinstall -install

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). If you execute this from an elevated process, it will be global for the machine (files will be copied to System32, HKLM will be changed, etc)

Installing for MingGW/msys2

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.

We'd suggest installing from https://packages.msys2.org/base/mingw-w64-python-pywin32 pacman -S mingw-w64-python-pywin32.

We're open to seeing these patches be upstreamed in pywin32 if they can be tested automatically on the CI.

Running as a Windows Service

To run as a service, you probably want to install pywin32 globally from an elevated command prompt - see above.

You also need to ensure Python is installed in a location where the user running the service has access to the installation and is able to load pywintypesXX.dll and pythonXX.dll. In particular, the LocalSystem account typically will not have access to your local %USER% directory structure.

Troubleshooting

If you encounter any problems when upgrading like the following:

The specified procedure could not be found
Entry-point not found

It usually means one of 2 things:

  • You've upgraded an install where the post-install script was previously run. So you should run it again:

    python -m pywin32_postinstall -install
    

    or (shorter but you don't have control over which python environment is used)

    pywin32_postinstall -install
    

    This will make some small attempts to cleanup older conflicting installs.

  • There are other pywin32 DLLs installed in your system, but in a different location than the new ones. This sometimes happens in environments that come with pywin32 pre-shipped (eg, anaconda?).

    The possible solutions here are:

    • Run the "post_install" script documented above.
    • Otherwise, find and remove all other copies of pywintypesXX.dll and pythoncomXX.dll (where XX is the Python version - eg, "39")

Building from source

Install Visual Studio 2019 (later probably works, but options might be different), follow the instructions in Build environment for the version you install.

Then follow the Build instructions for the build itself (including ARM64 cross-compilation).

Release process

The following steps are performed when making a new release - this is mainly to form a checklist so @mhammond doesn't forget what to do :)

Since build 307 the release process is based on the artifacts created by Github actions.

  • Ensure CHANGES.txt has everything worth noting. Update the header to reflect the about-to-be released build and date, commit it.

  • Update setup.py with the new build number. Update CHANGES.txt to have a new heading section for the next unreleased version. (ie, a new, empty "Coming in build XXX, as yet unreleased" section)

  • Push these changes to github, wait for the actions to complete, then download the artifacts from that run.

  • Upload .whl artifacts to pypi - we do this before pushing the tag because they might be rejected for an invalid README.md. Done via py -3.? -m twine upload dist/*XXX*.whl.

  • Create a new git tag for the release.

  • Update setup.py with the new build number + ".1" (eg, 123.1), to ensure future test builds aren't mistaken for the real release.

  • Make sure everything is pushed to github, including the tag (ie, git push --tags)

  • Send mail to python-win32

Older Manual Release Process

This is the old process used when a local dev environment was used to create the builds. Build 306 was the last released with this process.

  • Ensure CHANGES.txt has everything worth noting. Update the header to reflect the about-to-be released build and date, commit it.

  • Update setup.py with the new build number.

  • Execute make_all.bat, wait forever, test the artifacts.

  • Upload .whl artifacts to pypi - we do this before pushing the tag because they might be rejected for an invalid README.md. Done via py -3.? -m twine upload dist/*XXX*.whl.

  • Commit setup.py (so the new build number is in the repo), create a new git tag

  • Upload the .exe installers to github.

  • Update setup.py with the new build number + ".1" (eg, 123.1), to ensure future test builds aren't mistaken for the real release.

  • Make sure everything is pushed to github, including the tag (ie, git push --tags)

  • Send mail to python-win32

Metadata

Release files for pywin32 309

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distributions (wheels)

Table of built distributions (wheels) for pywin32 309
File
pywin32-309-cp313-cp313-win_arm64.whl CPython 3.13 CPython 3.13 Windows ARM64 Details
pywin32-309-cp313-cp313-win_amd64.whl CPython 3.13 CPython 3.13 Windows x86-64 Details
pywin32-309-cp313-cp313-win32.whl CPython 3.13 CPython 3.13 Windows x86-32 Details
pywin32-309-cp312-cp312-win_arm64.whl CPython 3.12 CPython 3.12 Windows ARM64 Details
pywin32-309-cp312-cp312-win_amd64.whl CPython 3.12 CPython 3.12 Windows x86-64 Details
pywin32-309-cp312-cp312-win32.whl CPython 3.12 CPython 3.12 Windows x86-32 Details
pywin32-309-cp311-cp311-win_arm64.whl CPython 3.11 CPython 3.11 Windows ARM64 Details
pywin32-309-cp311-cp311-win_amd64.whl CPython 3.11 CPython 3.11 Windows x86-64 Details
pywin32-309-cp311-cp311-win32.whl CPython 3.11 CPython 3.11 Windows x86-32 Details
pywin32-309-cp310-cp310-win_arm64.whl CPython 3.10 CPython 3.10 Windows ARM64 Details
pywin32-309-cp310-cp310-win_amd64.whl CPython 3.10 CPython 3.10 Windows x86-64 Details
pywin32-309-cp310-cp310-win32.whl CPython 3.10 CPython 3.10 Windows x86-32 Details
pywin32-309-cp39-cp39-win_amd64.whl CPython 3.9 CPython 3.9 Windows x86-64 Details
pywin32-309-cp39-cp39-win32.whl CPython 3.9 CPython 3.9 Windows x86-32 Details
pywin32-309-cp38-cp38-win_amd64.whl CPython 3.8 CPython 3.8 Windows x86-64 Details
pywin32-309-cp38-cp38-win32.whl CPython 3.8 CPython 3.8 Windows x86-32 Details

Total release size: 144.1 MB

Release files / pywin32-309-cp313-cp313-win_arm64.whl

Download URL pywin32-309-cp313-cp313-win_arm64.whl
Size 8.5 MB
Tags CPython 3.13 Windows ARM64
SHA-256 checksum
How to use checksums
8fd9669cfd41863b688a1bc9b1d4d2d76fd4ba2128be50a70b0ea66b8d37953b
BLAKE2b-256 checksum
How to use checksums
2c849a51e6949a03f25cd329ece54dbf0846d57fadd2e79046c3b8d140aaa132
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.11.3

Release files / pywin32-309-cp313-cp313-win_amd64.whl

Download URL pywin32-309-cp313-cp313-win_amd64.whl
Size 9.5 MB
Tags CPython 3.13 Windows x86-64
SHA-256 checksum
How to use checksums
bd0724f58492db4cbfbeb1fcd606495205aa119370c0ddc4f70e5771a3ab768d
BLAKE2b-256 checksum
How to use checksums
dd66330f265140fa814b4ed1bf16aea701f9d005f8f4ab57a54feb17f53afe7e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.11.3

Release files / pywin32-309-cp313-cp313-win32.whl

Download URL pywin32-309-cp313-cp313-win32.whl
Size 8.8 MB
Tags CPython 3.13 Windows x86-32
SHA-256 checksum
How to use checksums
008bffd4afd6de8ca46c6486085414cc898263a21a63c7f860d54c9d02b45c8d
BLAKE2b-256 checksum
How to use checksums
6cc351aca6887cc5e410aa4cdc55662cf8438212440c67335c3f141b02eb8d52
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.11.3

Release files / pywin32-309-cp312-cp312-win_arm64.whl

Download URL pywin32-309-cp312-cp312-win_arm64.whl
Size 8.5 MB
Tags CPython 3.12 Windows ARM64
SHA-256 checksum
How to use checksums
619f3e0a327b5418d833f44dc87859523635cf339f86071cc65a13c07be3110f
BLAKE2b-256 checksum
How to use checksums
189f79703972958f8ba3fd38bc9bf1165810bd75124982419b0cc433a2894d46
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.11.3

Release files / pywin32-309-cp312-cp312-win_amd64.whl

Download URL pywin32-309-cp312-cp312-win_amd64.whl
Size 9.5 MB
Tags CPython 3.12 Windows x86-64
SHA-256 checksum
How to use checksums
6ff9eebb77ffc3d59812c68db33c0a7817e1337e3537859499bd27586330fc9e
BLAKE2b-256 checksum
How to use checksums
dd11c36884c732e2b3397deee808b5dac1abbb170ec37f94c6606fcb04d1e9d7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.11.3

Release files / pywin32-309-cp312-cp312-win32.whl

Download URL pywin32-309-cp312-cp312-win32.whl
Size 8.8 MB
Tags CPython 3.12 Windows x86-32
SHA-256 checksum
How to use checksums
de9acacced5fa82f557298b1fed5fef7bd49beee04190f68e1e4783fbdc19926
BLAKE2b-256 checksum
How to use checksums
202cb0240b14ff3dba7a8a7122dc9bbf7fbd21ed0e8b57c109633675b5d1761f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.11.3

Release files / pywin32-309-cp311-cp311-win_arm64.whl

Download URL pywin32-309-cp311-cp311-win_arm64.whl
Size 8.5 MB
Tags CPython 3.11 Windows ARM64
SHA-256 checksum
How to use checksums
54ee296f6d11db1627216e9b4d4c3231856ed2d9f194c82f26c6cb5650163f4c
BLAKE2b-256 checksum
How to use checksums
7a4b1f5e377a04448cf410e13040bc0e4c408bfa0a65705cabf96904178f18df
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.11.3

Release files / pywin32-309-cp311-cp311-win_amd64.whl

Download URL pywin32-309-cp311-cp311-win_amd64.whl
Size 9.5 MB
Tags CPython 3.11 Windows x86-64
SHA-256 checksum
How to use checksums
e7ec2cef6df0926f8a89fd64959eba591a1eeaf0258082065f7bdbe2121228db
BLAKE2b-256 checksum
How to use checksums
6af0ae8ddb56771093dd2905baa852958fd65d42a8972aeefcf13578dfae69f4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.11.3

Release files / pywin32-309-cp311-cp311-win32.whl

Download URL pywin32-309-cp311-cp311-win32.whl
Size 8.8 MB
Tags CPython 3.11 Windows x86-32
SHA-256 checksum
How to use checksums
d5df6faa32b868baf9ade7c9b25337fa5eced28eb1ab89082c8dae9c48e4cd51
BLAKE2b-256 checksum
How to use checksums
05546409b1d98f2b8fed3bc2cc854859e48ae4a2dd956176664e38ee49c50a4c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.11.3

Release files / pywin32-309-cp310-cp310-win_arm64.whl

Download URL pywin32-309-cp310-cp310-win_arm64.whl
Size 8.5 MB
Tags CPython 3.10 Windows ARM64
SHA-256 checksum
How to use checksums
c667bcc0a1e6acaca8984eb3e2b6e42696fc035015f99ff8bc6c3db4c09a466a
BLAKE2b-256 checksum
How to use checksums
1ecaeffaf45448a988f9a3ef5bb78519632761b9d941a3421c99d8a0a35ed8a2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.11.3

Release files / pywin32-309-cp310-cp310-win_amd64.whl

Download URL pywin32-309-cp310-cp310-win_amd64.whl
Size 9.6 MB
Tags CPython 3.10 Windows x86-64
SHA-256 checksum
How to use checksums
728d08046f3d65b90d4c77f71b6fbb551699e2005cc31bbffd1febd6a08aa698
BLAKE2b-256 checksum
How to use checksums
6353a568b1501e52363edf02db1ae3d3880d5307c7451dd31fb4f380b968b3c1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.11.3

Release files / pywin32-309-cp310-cp310-win32.whl

Download URL pywin32-309-cp310-cp310-win32.whl
Size 8.8 MB
Tags CPython 3.10 Windows x86-32
SHA-256 checksum
How to use checksums
5b78d98550ca093a6fe7ab6d71733fbc886e2af9d4876d935e7f6e1cd6577ac9
BLAKE2b-256 checksum
How to use checksums
8cfaaeba8c29ef8cb83402a6f2e6c436d7cc705d79d22db7923704bb6f6af825
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.11.3

Release files / pywin32-309-cp39-cp39-win_amd64.whl

Download URL pywin32-309-cp39-cp39-win_amd64.whl
Size 9.6 MB
Tags CPython 3.9 Windows x86-64
SHA-256 checksum
How to use checksums
88bc06d6a9feac70783de64089324568ecbc65866e2ab318eab35da3811fd7ef
BLAKE2b-256 checksum
How to use checksums
89a5390fbc106b5998296515d5a88730c6de472a6ed5f051db66d4cc46dd50fd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.11.3

Release files / pywin32-309-cp39-cp39-win32.whl

Download URL pywin32-309-cp39-cp39-win32.whl
Size 8.8 MB
Tags CPython 3.9 Windows x86-32
SHA-256 checksum
How to use checksums
72ae9ae3a7a6473223589a1621f9001fe802d59ed227fd6a8503c9af67c1d5f4
BLAKE2b-256 checksum
How to use checksums
80a29c0c9bda69e5064b616d4484624e097c13b2a2dfffe601609a1cb8e68ba1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.11.3

Release files / pywin32-309-cp38-cp38-win_amd64.whl

Download URL pywin32-309-cp38-cp38-win_amd64.whl
Size 9.6 MB
Tags CPython 3.8 Windows x86-64
SHA-256 checksum
How to use checksums
0be3071f555480fbfd86a816a1a773880ee655bf186aa2931860dbb44e8424f8
BLAKE2b-256 checksum
How to use checksums
7839eee3a49ac87881277f43506e9391ec27f00ff403a6e060a68b23e540d38a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.11.3

Release files / pywin32-309-cp38-cp38-win32.whl

Download URL pywin32-309-cp38-cp38-win32.whl
Size 8.8 MB
Tags CPython 3.8 Windows x86-32
SHA-256 checksum
How to use checksums
617b837dc5d9dfa7e156dbfa7d3906c009a2881849a80a9ae7519f3dd8c6cb86
BLAKE2b-256 checksum
How to use checksums
1de701fbb5f8c7be6403d71dc6793360d2af6f759b4a9a389c5bb9c30bf69d4f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.11.3

Release history Release notifications | RSS feed

312

21 release files

311

20 release files

310

16 release files

This release

309 This release

16 release files

308

18 release files

307

18 release files

306

14 release files

305

14 release files

304

14 release files

303

12 release files

302

10 release files

301

10 release files

300

10 release files

228

12 release files

227

12 release files

226

12 release files

225

12 release files

224

8 release files

223

8 release files

222

7 release files

214

210

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page